mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-10-14 16:07:15 +00:00
(js) Remove non-ascii characters from CSS ids
This commit is contained in:
1 parent
536b02b9fd
commit
8697b6c835
1 file changed
+2
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user