[svn r52] \n handling for Opera.... :-(
--- a/cssParser.js Tue Mar 16 07:14:39 2010 -0500
+++ b/cssParser.js Tue Mar 16 07:37:43 2010 -0500
@@ -302,17 +302,25 @@
parseString: function(aStop) {
var s = aStop;
var previousChar = aStop;
+ var c;
while ((c = this.read()) != -1) {
if (c == aStop && previousChar != CSS_ESCAPE) {
s += c;
break;
}
else if (c == CSS_ESCAPE) {
- var c = this.peek();
+ c = this.peek();
if (c == -1)
break;
else if (c == "\n" || c == "\r" || c == "\f") {
+ d = c;
c = this.read();
+ // special for Opera that preserves \r\n...
+ if (d == "\r") {
+ c = this.peek();
+ if (c == "\n")
+ c = this.read();
+ }
}
else {
s += this.gatherEscape();