mirror of https://github.com/calzoneman/sync.git
Fix regex warning message
This commit is contained in:
parent
f5528c766f
commit
da6eadf33b
|
@ -2160,13 +2160,13 @@ function checkEntitiesInStr(str) {
|
||||||
">": ">",
|
">": ">",
|
||||||
'"': """,
|
'"': """,
|
||||||
"'": "'",
|
"'": "'",
|
||||||
"(": "(",
|
"\\(": "(",
|
||||||
")": ")"
|
"\\)": ")"
|
||||||
};
|
};
|
||||||
|
|
||||||
var m = str.match(/([&<>"'\(\)])/);
|
var m = str.match(/([&<>"'])|(\\\()|(\\\))/);
|
||||||
if (m && m[1] in entities) {
|
if (m && m[1] in entities) {
|
||||||
return { src: m[1], replace: entities[m[1]] };
|
return { src: m[1].replace(/^\\/, ""), replace: entities[m[1]] };
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue