Bug 612527 - Implement spec tweaks to U+0000 handling in the HTML5 parser. rs=jonas, a=blocking2.0-betaN.
This commit is contained in:
@@ -3424,7 +3424,7 @@ public class Tokenizer implements Locator {
|
||||
}
|
||||
switch (c) {
|
||||
case '\u0000':
|
||||
emitReplacementCharacter(buf, pos);
|
||||
emitPlaintextReplacementCharacter(buf, pos);
|
||||
continue;
|
||||
case '\r':
|
||||
emitCarriageReturn(buf, pos);
|
||||
@@ -5785,6 +5785,13 @@ public class Tokenizer implements Locator {
|
||||
cstart = pos + 1;
|
||||
}
|
||||
|
||||
private void emitPlaintextReplacementCharacter(@NoLength char[] buf, int pos)
|
||||
throws SAXException {
|
||||
flushChars(buf, pos);
|
||||
tokenHandler.characters(REPLACEMENT_CHARACTER, 0, 1);
|
||||
cstart = pos + 1;
|
||||
}
|
||||
|
||||
private void setAdditionalAndRememberAmpersandLocation(char add) {
|
||||
additional = add;
|
||||
// [NOCPP[
|
||||
|
||||
Reference in New Issue
Block a user