From 5e9dc3044f8aebd06bdd1095832a057e6efb7305 Mon Sep 17 00:00:00 2001 From: Henri Sivonen Date: Sat, 20 Jul 2019 15:23:12 +0200 Subject: Bug 1555523. --- parser/html/javasrc/Tokenizer.java | 9 +++------ parser/html/nsHtml5Tokenizer.cpp | 7 ++----- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/parser/html/javasrc/Tokenizer.java b/parser/html/javasrc/Tokenizer.java index d9eaafeb3..70e1df75c 100644 --- a/parser/html/javasrc/Tokenizer.java +++ b/parser/html/javasrc/Tokenizer.java @@ -3850,12 +3850,9 @@ public class Tokenizer implements Locator { tokenHandler.characters( Tokenizer.LT_SOLIDUS, 0, 2); emitStrBuf(); - if (c == '\u0000') { - emitReplacementCharacter(buf, pos); - } else { - cstart = pos; // don't drop the - // character - } + cstart = pos; // don't drop the + // character + reconsume = true; state = transition(state, returnState, reconsume, pos); continue stateloop; } diff --git a/parser/html/nsHtml5Tokenizer.cpp b/parser/html/nsHtml5Tokenizer.cpp index 2838d74aa..c469fe683 100644 --- a/parser/html/nsHtml5Tokenizer.cpp +++ b/parser/html/nsHtml5Tokenizer.cpp @@ -2091,11 +2091,8 @@ nsHtml5Tokenizer::stateLoop(int32_t state, char16_t c, int32_t pos, char16_t* bu default: { tokenHandler->characters(nsHtml5Tokenizer::LT_SOLIDUS, 0, 2); emitStrBuf(); - if (c == '\0') { - emitReplacementCharacter(buf, pos); - } else { - cstart = pos; - } + cstart = pos; + reconsume = true; state = P::transition(mViewSource, returnState, reconsume, pos); NS_HTML5_CONTINUE(stateloop); } -- cgit v1.2.3