summaryrefslogtreecommitdiff
path: root/hercules/code/stringutils.py
diff options
context:
space:
mode:
Diffstat (limited to 'hercules/code/stringutils.py')
-rw-r--r--hercules/code/stringutils.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/hercules/code/stringutils.py b/hercules/code/stringutils.py
index 3d0b77a..fccf403 100644
--- a/hercules/code/stringutils.py
+++ b/hercules/code/stringutils.py
@@ -33,3 +33,10 @@ def stripNewLine(data):
if data[-1] == "\n":
data = data[:-1]
return data
+
+def escapeSqlStr(data):
+ data = data.replace("'", "\\'");
+ data = data.replace("`", "\\`");
+ data = data.replace("{", "\\{");
+ data = data.replace("}", "\\}");
+ return data