Fix the input stream reader method for the CDATA Section state

- All carriage returns must be converted to line feeds
- All line feeds following a carriage return must be ignored

https://html.spec.whatwg.org/multipage/syntax.html#preprocessing-the-input-stream
This commit is contained in:
iska
2015-04-11 00:18:39 +02:00
parent 27375e3a47
commit aa008900c9
+2
View File
@@ -188,6 +188,8 @@
NSString *consumed;
[_scanner scanUpToString:string intoString:&consumed];
_location = _scanner.scanLocation;
consumed = [consumed stringByReplacingOccurrencesOfString:@"\r\n" withString:@"\r"];
consumed = [consumed stringByReplacingOccurrencesOfString:@"\r" withString:@"\n"];
return consumed;
}