From 8517ed1d0f687a53adc628ffb2162803359b8de7 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Fri, 1 Apr 2022 01:14:39 +0300 Subject: [PATCH] ... Signed-off-by: Alex A. Naanou --- wiki.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/wiki.js b/wiki.js index dae138a..31b9d30 100755 --- a/wiki.js +++ b/wiki.js @@ -10,9 +10,10 @@ // var quoteRegExp = RegExp.quoteRegExp = -function(str){ - return str - .replace(/([\.\\\/\(\)\[\]\$\*\+\-\{\}\@\^\&\?\<\>])/g, '\\$1') } + RegExp.quoteRegExp + || function(str){ + return str + .replace(/([\.\\\/\(\)\[\]\$\*\+\-\{\}\@\^\&\?\<\>])/g, '\\$1') } var path2lst = function(path){ return (path instanceof Array ? path : path.split(/[\\\/]+/g))