From 6a2240f5935a4608e651a33c39219e912c9ea9ba Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Thu, 26 Feb 2015 04:58:07 +0100 Subject: 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 (&'"<>) --- src/xmpp/xmpp_stanza.hpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/xmpp/xmpp_stanza.hpp') diff --git a/src/xmpp/xmpp_stanza.hpp b/src/xmpp/xmpp_stanza.hpp index 9229ae6..f1a6a0f 100644 --- a/src/xmpp/xmpp_stanza.hpp +++ b/src/xmpp/xmpp_stanza.hpp @@ -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 -- cgit v1.2.3