--- a/mod_invite/mod_invite.lua Fri Jul 08 23:42:30 2016 +0200
+++ b/mod_invite/mod_invite.lua Fri Jul 08 23:56:42 2016 +0200
@@ -6,6 +6,7 @@
local http_urlencode = require "net.http".urlencode;
local usermanager = require "core.usermanager";
local rostermanager = require "core.rostermanager";
+local tohtml = require "util.stanza".xml_escape
local nodeprep = require "util.encodings".stringprep.nodeprep;
local tostring = tostring;
@@ -16,15 +17,6 @@
module:depends"http";
-local entities = {
- ["<"] = "<", [">"] = ">", ["&"] = "&",
- ["'"] = "'", ["\""] = """, ["\n"] = "<br/>",
-};
-
-local function tohtml(plain)
- return (plain:gsub("[<>&'\"\n]", entities));
-end
-
local function apply_template(template, args)
return
template:gsub("{{([^}]*)}}", function (k)