From 32ac3c84214666f40ed45dd4b14fbe379640281e Mon Sep 17 00:00:00 2001 From: df Date: Sun, 21 Feb 2021 12:33:55 +0000 Subject: [PATCH] Fix quoting of replacement text, avoiding "unmatched ]" --- webif/lib/utils | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webif/lib/utils b/webif/lib/utils index e9b794b..7eb71e4 100644 --- a/webif/lib/utils +++ b/webif/lib/utils @@ -103,13 +103,13 @@ proc ::js::_unescape {str} { proc ::js::escape {str} { return [subst -nobackslashes -novariables \ [regsub -all -- {[^A-Za-z0-9@*_+-./]+} $str \ - {[::js::_escape "&"]}]] + {[::js::_escape {&}]}]] } proc ::js::unescape {str} { return [subst -nobackslashes -novariables \ [regsub -all -- {%(u[[:xdigit:]]{2})?[[:xdigit:]]{2}} $str \ - {[::js::_unescape "&"]}]] + {[::js::_unescape {&}]}]] } alias jsescape ::js::escape