Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #105 from ygaras/master

#104 Adding \9 to reserved tokens
commit a8f294df10226a2e78bdf22f604b0344df723042 2 parents 103c414 + 68b4c4e
Joey Smith tml authored
8 src/com/yahoo/platform/yui/compressor/CssCompressor.java
View
@@ -212,7 +212,13 @@ public void compress(Writer out, int linebreakpos)
css = css.replace("/*" + placeholder + "*/", "");
}
-
+ // preserve \9 IE hack
+ final String backslash9 = "\\9";
+ while (css.indexOf(backslash9) > -1) {
+ preservedTokens.add(backslash9);
+ css = css.replace(backslash9, "___YUICSSMIN_PRESERVED_TOKEN_" + (preservedTokens.size() - 1) + "___");
+ }
+
// Normalize all whitespace strings to single spaces. Easier to work with that way.
css = css.replaceAll("\\s+", " ");
2  tests/ie-backslash9-hack.css
View
@@ -0,0 +1,2 @@
+label{padding-left: 4px\9;}
+@charset "UTF-8";
1  tests/ie-backslash9-hack.css.min
View
@@ -0,0 +1 @@
+@charset "UTF-8";label{padding-left:4px\9}
Please sign in to comment.
Something went wrong with that request. Please try again.