From abaf4c73715e99a3658477cd611bd2f988564e2e Mon Sep 17 00:00:00 2001 From: ansuz Date: Thu, 12 Sep 2019 17:24:40 +0200 Subject: [PATCH] escapeKeyCharacters is now a common utility --- www/common/common-util.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/www/common/common-util.js b/www/common/common-util.js index 020f3a7b7..f607c30f4 100644 --- a/www/common/common-util.js +++ b/www/common/common-util.js @@ -130,6 +130,14 @@ return C; }; + Util.escapeKeyCharacters = function (key) { + return key && key.replace && key.replace(/\//g, '-'); + }; + + Util.unescapeKeyCharacters = function (key) { + return key.replace(/\-/g, '/'); + }; + Util.deduplicateString = function (array) { var a = array.slice(); for(var i=0; i