summaryrefslogtreecommitdiff
path: root/louloulibs/xmpp
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2016-02-10 20:22:51 +0100
committerFlorent Le Coz <louiz@louiz.org>2016-02-10 20:23:27 +0100
commit218260362f0ccb4fd5b51765d4bd331389f39baa (patch)
treecb71bb36d298c9ad0d323bc807e03b22cf7d6ad7 /louloulibs/xmpp
parenta13285d0ff360d0a83e007a776d9efbcfc347c76 (diff)
downloadbiboumi-218260362f0ccb4fd5b51765d4bd331389f39baa.tar.gz
biboumi-218260362f0ccb4fd5b51765d4bd331389f39baa.tar.bz2
biboumi-218260362f0ccb4fd5b51765d4bd331389f39baa.tar.xz
biboumi-218260362f0ccb4fd5b51765d4bd331389f39baa.zip
Remove unused xml_unescape() function
Diffstat (limited to 'louloulibs/xmpp')
-rw-r--r--louloulibs/xmpp/xmpp_stanza.cpp44
1 files changed, 0 insertions, 44 deletions
diff --git a/louloulibs/xmpp/xmpp_stanza.cpp b/louloulibs/xmpp/xmpp_stanza.cpp
index 407e631..ac6ce9b 100644
--- a/louloulibs/xmpp/xmpp_stanza.cpp
+++ b/louloulibs/xmpp/xmpp_stanza.cpp
@@ -40,50 +40,6 @@ std::string xml_escape(const std::string& data)
return res;
}
-std::string xml_unescape(const std::string& data)
-{
- std::string res;
- res.reserve(data.size());
- const char* str = data.c_str();
- while (str && *str && static_cast<size_t>(str - data.c_str()) < data.size())
- {
- if (*str == '&')
- {
- if (strncmp(str+1, "amp;", 4) == 0)
- {
- res += "&";
- str += 4;
- }
- else if (strncmp(str+1, "lt;", 3) == 0)
- {
- res += "<";
- str += 3;
- }
- else if (strncmp(str+1, "gt;", 3) == 0)
- {
- res += ">";
- str += 3;
- }
- else if (strncmp(str+1, "quot;", 5) == 0)
- {
- res += "\"";
- str += 5;
- }
- else if (strncmp(str+1, "apos;", 5) == 0)
- {
- res += "'";
- str += 5;
- }
- else
- res += "&";
- }
- else
- res += *str;
- str++;
- }
- return res;
-}
-
std::string sanitize(const std::string& data, const std::string& encoding)
{
if (utils::is_valid_utf8(data.data()))