diff --git a/www/js/util.js b/www/js/util.js index 7ce55028..cf8a5d58 100644 --- a/www/js/util.js +++ b/www/js/util.js @@ -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 {