mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-23 05:49:31 +00:00
(js) Remove non-ascii characters from CSS ids
This commit is contained in:
@@ -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