diff -r 9700c89f7bf6 mod_post_msg/mod_post_msg.lua
--- a/mod_post_msg/mod_post_msg.lua	Thu Jan 23 20:27:14 2014 +0000
+++ b/mod_post_msg/mod_post_msg.lua	Fri Feb 14 14:43:54 2014 +0100
@@ -6,6 +6,7 @@
 local test_password = require "core.usermanager".test_password;
 local b64_decode = require "util.encodings".base64.decode;
 local formdecode = require "net.http".formdecode;
+local xml = require"util.xml"
 
 local function require_valid_user(f)
 	return function(event, path)
@@ -46,8 +48,11 @@
 		end
 	elseif body_type == "application/x-www-form-urlencoded" then
 		local post_body = formdecode(request.body);
-			message = msg({ to = post_body.to or to, from = authed_user,
+		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
+		   message:tag("html", {xmlns="http://jabber.org/protocol/xhtml-im"}):add_child(xml.parse(post_body.html)):up();
+		end
 	else
 		return 415;
 	end
