summaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-02-21 00:33:29 +0300
committerAndrei Karas <akaras@inbox.ru>2013-02-21 00:33:29 +0300
commitad465929229a928d418c68b7786c18f95f170eba (patch)
treeffc9fe3337948eaa871e00225830dd7a9a0631c8 /src/utils
parent37deb731372da40bb9ce5bc4b8d8e19bfc750163 (diff)
downloadmanaverse-ad465929229a928d418c68b7786c18f95f170eba.tar.gz
manaverse-ad465929229a928d418c68b7786c18f95f170eba.tar.bz2
manaverse-ad465929229a928d418c68b7786c18f95f170eba.tar.xz
manaverse-ad465929229a928d418c68b7786c18f95f170eba.zip
Fix some incorrect chars in browserbox links.
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/stringutils.cpp10
-rw-r--r--src/utils/stringutils.h4
2 files changed, 14 insertions, 0 deletions
diff --git a/src/utils/stringutils.cpp b/src/utils/stringutils.cpp
index 74e5d9f58..d4585a26d 100644
--- a/src/utils/stringutils.cpp
+++ b/src/utils/stringutils.cpp
@@ -668,3 +668,13 @@ signed char parseBoolean(const std::string &value)
else
return -1;
}
+
+std::string encodeLinkText(std::string data)
+{
+ return replaceAll(data, "|", "\342\235\230");
+}
+
+std::string decodeLinkText(std::string data)
+{
+ return replaceAll(data, "\342\235\230", "|");
+}
diff --git a/src/utils/stringutils.h b/src/utils/stringutils.h
index 612486cb2..8b3ae0563 100644
--- a/src/utils/stringutils.h
+++ b/src/utils/stringutils.h
@@ -223,4 +223,8 @@ std::string getDateString() A_WARN_UNUSED;
signed char parseBoolean(const std::string &value);
+std::string encodeLinkText(std::string data);
+
+std::string decodeLinkText(std::string data);
+
#endif // UTILS_STRINGUTILS_H