Add missing char to to_ascii

This commit is contained in:
Ben Ng 2013-08-15 17:26:48 -07:00
parent d051f29cac
commit e38b5a70e8

View File

@ -80,11 +80,12 @@ function OutputStream(options) {
while (code.length < 4) code = "0" + code; while (code.length < 4) code = "0" + code;
return "\\u" + code; return "\\u" + code;
} }
}); }).replace(/\x0B/g, "\\x0B");
}; };
function make_string(str) { function make_string(str) {
var dq = 0, sq = 0; var dq = 0, sq = 0;
str = str.replace(/[\\\b\f\n\r\t\x22\x27\u2028\u2029\0]/g, function(s){ str = str.replace(/[\\\b\f\n\r\t\x22\x27\u2028\u2029\0]/g, function(s){
switch (s) { switch (s) {
case "\\": return "\\\\"; case "\\": return "\\\\";