Commit e7a441e7 authored by louiz’'s avatar louiz’

Add a test for xml escape/unescape

parent a85e1aba
......@@ -66,6 +66,13 @@ int main()
});
xml.feed(doc.data(), doc.size(), true);
/**
* XML escape/escape
*/
const std::string unescaped = "'coucou'<cc>/&\"gaga\"";
assert(xml_escape(unescaped) == "&apos;coucou&apos;&lt;cc&gt;/&amp;&quot;gaga&quot;");
assert(xml_unescape(xml_escape(unescaped)) == unescaped);
/**
* JID parsing
*/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment