summaryrefslogtreecommitdiff
path: root/src/mono_opt.sml
diff options
context:
space:
mode:
Diffstat (limited to 'src/mono_opt.sml')
-rw-r--r--src/mono_opt.sml4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mono_opt.sml b/src/mono_opt.sml
index 1430dfe2..3946684a 100644
--- a/src/mono_opt.sml
+++ b/src/mono_opt.sml
@@ -84,7 +84,9 @@ val urlifyString = String.translate (fn #" " => "+"
val sqlifyInt = attrifyInt
val sqlifyFloat = attrifyFloat
-fun sqlifyString s = "E'" ^ String.toString s ^ "'"
+fun sqlifyString s = "E'" ^ String.translate (fn #"'" => "\\'"
+ | ch => str ch)
+ (String.toString s) ^ "'"
fun exp e =
case e of