(js) Remove non-ascii characters from CSS ids

This commit is contained in:
Francis Lachapelle
2017-09-01 12:38:12 -04:00
parent 536b02b9fd
commit 8697b6c835

View File

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