* Adds simplified and more advanced text escaping / restoring via `EscapeStore` class.
+1.1.6 / 2013-xx-xx
+==================
+
+* Fixed issue [#155](https://github.com/GoalSmashers/clean-css/issues/155) - broken irregular CSS content.
+
1.1.5 / 2013-10-24
==================
// strip parentheses in attribute values
replace(/\[([^\]]+)\]/g, function(match, content) {
var eqIndex = content.indexOf('=');
- if (eqIndex < 0 && content.indexOf('\'') < 0 && content.indexOf('"') < 0)
+ var singleQuoteIndex = content.indexOf('\'');
+ var doubleQuoteIndex = content.indexOf('"');
+ if (eqIndex < 0 && singleQuoteIndex < 0 && doubleQuoteIndex < 0)
+ return match;
+ if (singleQuoteIndex === 0 || doubleQuoteIndex === 0)
return match;
var key = content.substring(0, eqIndex);
'special characters': [
'a{content : " a > div { } "}',
'a{content:" a > div { } "}'
- ]
+ ],
+ 'with JSON': 'body::before{content:\'{ "current" : "small", "all" : ["small"], "position" : 0 }\'}'
}),
'zero values': cssContext({
'with units': [
'should keep quotation if is a number': 'div[data-number=\'1\']{border-color:red}',
'should keep quotation if starts with a number': 'div[data-type^=\'1something\']{border-color:red}',
'should keep quotation if starts with a hyphen': 'div[data-type$=\'-something\']{border-color:red}',
+ 'should keep quotation if key only (which is invalid)': 'div["data-type"]',
'should strip quotation if is a word': [
'a[data-href=\'object\']{border-color:red}',
'a[data-href=object]{border-color:red}'