Changeset

1418:a0375f84d65a

mod_post_msg: Add <body> wrapper tag with namespace in module so the client doesn't have to
author Kim Alvefur <zash@zash.se>
date Wed, 28 May 2014 21:20:51 +0200
parents 1417:9b6fbababb8c
children 1419:877dc87539ff
files mod_post_msg/mod_post_msg.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_post_msg/mod_post_msg.lua	Wed May 28 20:34:57 2014 +0200
+++ b/mod_post_msg/mod_post_msg.lua	Wed May 28 21:20:51 2014 +0200
@@ -50,7 +50,7 @@
 		message = msg({ to = post_body.to or to, from = authed_user,
 		                type = post_body.type or "chat"}, post_body.body);
 		if post_body.html then
-			local html, err = xml.parse(post_body.html);
+			local html, err = xml.parse([[<body xmlns="http://www.w3.org/1999/xhtml">]]..post_body.html..[[</body>]]);
 			if not html then
 				module:log("warn", "mod_post_msg: invalid XML: %s", err);
 				return 400;