Properly sanitize everything in the XML we send to the XMPP server

in this order:
- Make sure it is utf-8 encoded
- Remove all chars that are invalid in XML
- Escape all XML special chars (&'"<>)
This commit is contained in:
Florent Le Coz
2015-02-26 04:58:07 +01:00
parent 53e6b1da69
commit 6a2240f593
2 changed files with 12 additions and 4 deletions
+1
View File
@@ -7,6 +7,7 @@
std::string xml_escape(const std::string& data);
std::string xml_unescape(const std::string& data);
std::string sanitize(const std::string& data);
/**
* Represent an XML node. It has