Bug 612527 - Implement spec tweaks to U+0000 handling in the HTML5 parser. rs=jonas, a=blocking2.0-betaN.
This commit is contained in:
@@ -1717,7 +1717,7 @@ nsHtml5Tokenizer::stateLoop(PRInt32 state, PRUnichar c, PRInt32 pos, PRUnichar*
|
||||
}
|
||||
switch(c) {
|
||||
case '\0': {
|
||||
emitReplacementCharacter(buf, pos);
|
||||
emitPlaintextReplacementCharacter(buf, pos);
|
||||
continue;
|
||||
}
|
||||
case '\r': {
|
||||
@@ -3300,6 +3300,14 @@ nsHtml5Tokenizer::emitReplacementCharacter(PRUnichar* buf, PRInt32 pos)
|
||||
cstart = pos + 1;
|
||||
}
|
||||
|
||||
void
|
||||
nsHtml5Tokenizer::emitPlaintextReplacementCharacter(PRUnichar* buf, PRInt32 pos)
|
||||
{
|
||||
flushChars(buf, pos);
|
||||
tokenHandler->characters(REPLACEMENT_CHARACTER, 0, 1);
|
||||
cstart = pos + 1;
|
||||
}
|
||||
|
||||
void
|
||||
nsHtml5Tokenizer::setAdditionalAndRememberAmpersandLocation(PRUnichar add)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user