(js) Remove non-ascii characters from CSS ids

pull/218/merge
Francis Lachapelle 2017-09-18 12:11:12 -04:00
parent 8c5977088f
commit d02f0db0b4
1 changed files with 1 additions and 1 deletions

View File

@ -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;