summaryrefslogtreecommitdiff
path: root/protocols/Twitter/src/StringUtil.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Twitter/src/StringUtil.cpp')
-rw-r--r--protocols/Twitter/src/StringUtil.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/protocols/Twitter/src/StringUtil.cpp b/protocols/Twitter/src/StringUtil.cpp
index 61cb9adbd2..0ac892cd1f 100644
--- a/protocols/Twitter/src/StringUtil.cpp
+++ b/protocols/Twitter/src/StringUtil.cpp
@@ -86,3 +86,13 @@ std::string& replaceAll(std::string& context, const std::string& from, const std
}
return context;
}
+
+std::string& htmlEntitiesDecode(std::string& context)
+{
+ replaceAll(context, "&", "&");
+ replaceAll(context, """, "\"");
+ replaceAll(context, "&lt;", "<");
+ replaceAll(context, "&gt;", ">");
+
+ return context;
+} \ No newline at end of file