From 8697b6c8352515faf0722ba02cecea2064359732 Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Fri, 1 Sep 2017 12:38:12 -0400 Subject: [PATCH] (js) Remove non-ascii characters from CSS ids --- UI/WebServerResources/js/Common/utils.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/UI/WebServerResources/js/Common/utils.js b/UI/WebServerResources/js/Common/utils.js index d6f41b738..4a8cd9e1d 100644 --- a/UI/WebServerResources/js/Common/utils.js +++ b/UI/WebServerResources/js/Common/utils.js @@ -149,6 +149,8 @@ String.prototype.asCSSIdentifier = function() { newString = newString.replace(re, escapeds[i]); } + newString = newString.replace(/[^a-zA-Z_\-]/g, ''); + if (/^\d+/.test(newString)) { newString = '_' + newString; }