From 3fcb855c35aee8929942f4543fb2cfe8f2c97619 Mon Sep 17 00:00:00 2001 From: calzoneman Date: Sun, 4 May 2014 14:22:13 -0500 Subject: [PATCH] Fix the regex warning message about parentheses --- www/js/util.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 {