Change octal escape with hexadecimal escape

Octal escape sequences are not allowed in strict mode.

Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
This commit is contained in:
Maurício Meneghini Fauth 2017-06-14 12:31:43 -03:00 committed by GitHub
parent a09ce953ba
commit d853b60762

View File

@ -352,7 +352,7 @@ function escapeJsString(unsafe) {
if (typeof(unsafe) != 'undefined') {
return unsafe
.toString()
.replace("\000", '')
.replace("\x00", '')
.replace('\\', '\\\\')
.replace('\'', '\\\'')
.replace("&#039;", "\\\&#039;")