From 4689af20505946b1325231b3a9412ac868871277 Mon Sep 17 00:00:00 2001 From: j Date: Fri, 19 Mar 2021 10:19:29 +0100 Subject: [PATCH] replace all not just first --- static/js/utils.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/static/js/utils.js b/static/js/utils.js index a94bed6c1..574e4a87e 100644 --- a/static/js/utils.js +++ b/static/js/utils.js @@ -2659,8 +2659,9 @@ pandora.openURL = function(url) { }; pandora.safeDocumentName = function(name) { - ['?', '#', '%'].forEach(function(c) { - name = name.replace(c, '_'); + ['\\?', '#', '%', '/'].forEach(function(c) { + var r = new RegExp(c, 'g') + name = name.replace(r, '_'); }) return name; };