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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user