diff options
author | Adam Chlipala <adam@chlipala.net> | 2010-08-10 15:55:43 -0400 |
---|---|---|
committer | Adam Chlipala <adam@chlipala.net> | 2010-08-10 15:55:43 -0400 |
commit | 9a0ebd92b408b5d3a986348e4ce226c48eff820d (patch) | |
tree | 407556eab027f66694f1ddc3a0d4c1813e1b120f /src/cjr_print.sml | |
parent | 576949f00da484e776a75be16a45f5f39038ed21 (diff) |
Better UTF-8 escaping for JavaScript and SQL literals
Diffstat (limited to 'src/cjr_print.sml')
-rw-r--r-- | src/cjr_print.sml | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cjr_print.sml b/src/cjr_print.sml index 34936aac..412531a6 100644 --- a/src/cjr_print.sml +++ b/src/cjr_print.sml @@ -2128,7 +2128,7 @@ fun p_decl env (dAll as (d, _) : decl) = | DPreparedStatements _ => box [] | DJavaScript s => box [string "static char jslib[] = \"", - string (String.toString s), + string (String.toCString s), string "\";"] | DCookie s => box [string "/*", space, @@ -2585,7 +2585,7 @@ fun p_file env (ds, ps) = prefix ^ s in box [string "if (!strncmp(request, \"", - string (String.toString s), + string (String.toCString s), string "\", ", string (Int.toString (size s)), string ") && (request[", @@ -2761,10 +2761,10 @@ fun p_file env (ds, ps) = box [string "if (!str", case #kind rule of Settings.Exact => box [string "cmp(s, \"", - string (String.toString (#pattern rule)), + string (String.toCString (#pattern rule)), string "\"))"] | Settings.Prefix => box [string "ncmp(s, \"", - string (String.toString (#pattern rule)), + string (String.toCString (#pattern rule)), string "\", ", string (Int.toString (size (#pattern rule))), string "))"], |