mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-10-17 17:28:12 +00:00
(js) Remove non-ascii characters from CSS ids
This commit is contained in:
1 parent
8c5977088f
commit
d02f0db0b4
1 file changed
+1
-1
@@ -149,7 +149,7 @@ String.prototype.asCSSIdentifier = function() {
|
||||
newString = newString.replace(re, escapeds[i]);
|
||||
}
|
||||
|
||||
newString = newString.replace(/[^a-zA-Z_\-]/g, '');
|
||||
newString = newString.replace(/[^\x00-\x7F]/g, '');
|
||||
|
||||
if (/^\d+/.test(newString)) {
|
||||
newString = '_' + newString;
|
||||
|
||||
Reference in new issue
Block a user