Skip to content

Commit 8a3fa7e

Browse files
committed
U+0009, U+000A and U+000D are all legal in XML.
1 parent ae9c59f commit 8a3fa7e

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/ecma-debugger/helpers.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ window.cls.Helpers = function()
118118
var re_amp = /&/g;
119119
var re_lt = /</g;
120120
var re_cd_end = /]]>/g;
121-
var re_control_characters = /[\u0000-\u001f]/g;
121+
var re_control_characters = /[\u0000-\u0008\u000b\u000c\u000e-\u001f]/g;
122122
return function(str)
123123
{
124124
return str ? str.replace(re_amp, "&amp;")

src/syntaxhighlight/js/tokenizer.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,7 @@ cls.SimpleJSParser.prototype = new function()
358358
'>': '&gt;',
359359
'&': '&amp;',
360360
// The following control characters need to be escaped in XML.
361+
// U+0000-U+001F excluding U+0009, U+000A and U+000D.
361362
'\u0000': '\\u0000',
362363
'\u0001': '\\u0001',
363364
'\u0002': '\\u0002',
@@ -367,11 +368,8 @@ cls.SimpleJSParser.prototype = new function()
367368
'\u0006': '\\u0006',
368369
'\u0007': '\\u0007',
369370
'\u0008': '\\u0008',
370-
'\u0009': '\\u0009',
371-
'\u000a': '\\u000a',
372371
'\u000b': '\\u000b',
373372
'\u000c': '\\u000c',
374-
'\u000d': '\\u000d',
375373
'\u000e': '\\u000e',
376374
'\u000f': '\\u000f',
377375
'\u0010': '\\u0010',

0 commit comments

Comments
 (0)