Revert "Revert "Improve creation of CSS identifier""

This reverts commit 7d018221ef.
This commit is contained in:
Ludovic Marcotte
2015-06-10 20:05:40 -04:00
parent 85ad849189
commit d9896192f3
2 changed files with 15 additions and 7 deletions
@@ -95,10 +95,12 @@ String.prototype.asDate = function () {
};
String.prototype.asCSSIdentifier = function() {
var characters = [ '_' , '\\.', '#' , '@' , '\\*', ':' , ',' , ' '
, "'", '&', '\\+' ];
var escapeds = [ '_U_', '_D_', '_H_', '_A_', '_S_', '_C_', '_CO_',
'_SP_', '_SQ_', '_AM_', '_P_' ];
var characters = [ '_' , '\\.', '#' , '@' , '\\*', ':' , ';' , ',' , ' ',
'\\(', '\\)', '\\[', '\\]', '\\{', '\\}',
, "'", '"', '&', '\\+' ];
var escapeds = [ '_U_', '_D_', '_H_', '_A_', '_S_', '_C_', '_SC_', '_CO_', '_SP_',
'_LP_', '_RP_', '_LS_', '_RQ_', '_LC_', '_RC_',
'_SQ_', '_DQ_', '_AM_', '_P_' ];
var newString = this;
for (var i = 0; i < characters.length; i++) {