summaryrefslogtreecommitdiff
path: root/src/utils/stringutils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/stringutils.cpp')
-rw-r--r--src/utils/stringutils.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/utils/stringutils.cpp b/src/utils/stringutils.cpp
index b2ac25875..66f61f168 100644
--- a/src/utils/stringutils.cpp
+++ b/src/utils/stringutils.cpp
@@ -996,6 +996,12 @@ std::string timeDiffToString(int timeDiff)
return str;
}
+std::string escapeString(std::string str)
+{
+ replaceAll(str, "\"", "\\\"");
+ return "\"" + str + "\"";
+}
+
#ifndef DYECMD
void replaceItemLinks(std::string &msg)
{