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