Fix the regex warning message about parentheses

This commit is contained in:
calzoneman 2014-05-04 14:22:13 -05:00
parent 992c8d8da9
commit 3fcb855c35
1 changed files with 3 additions and 3 deletions

View File

@ -2136,11 +2136,11 @@ function checkEntitiesInStr(str) {
">": ">",
'"': """,
"'": "'",
"(": "(",
")": ")"
"\\(": "(",
"\\)": ")"
};
var m = str.match(/([&<>"'\(\)])/);
var m = str.match(/([&<>"']|\\\(|\\\))/);
if (m && m[1] in entities) {
return { src: m[1], replace: entities[m[1]] };
} else {