From 7d8ce3b5638b8e09313a6218014a307ab98e6289 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Wed, 11 Dec 2013 21:22:06 +0100 Subject: Use XML-sanitized strings when serializing stanzas for the XMPP server --- src/test.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/test.cpp') diff --git a/src/test.cpp b/src/test.cpp index 958e894..c9427f0 100644 --- a/src/test.cpp +++ b/src/test.cpp @@ -97,6 +97,14 @@ int main() }); xml.feed(doc.data(), doc.size(), true); + const std::string doc2 = "coucou\r\n\a"; + xml.add_stanza_callback([](const Stanza& stanza) + { + std::cout << stanza.to_string() << std::endl; + assert(stanza.get_inner() == "coucou\r\n"); + }); + xml.feed(doc2.data(), doc.size(), true); + /** * XML escape/escape */ -- cgit v1.2.3