From f17219eabd71bde8e71be063c36b6f368bf32d94 Mon Sep 17 00:00:00 2001 From: Henri Sivonen Date: Sat, 15 Jun 2019 12:45:57 +0000 Subject: [PATCH] Bug 1555523. r=alchen Differential Revision: https://phabricator.services.mozilla.com/D33639 --HG-- extra : moz-landing-system : lando --- 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 29ca1df40782..1fb861327654 100644 --- a/parser/html/javasrc/Tokenizer.java +++ b/parser/html/javasrc/Tokenizer.java @@ -3949,12 +3949,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 001dcb46be0e..a83635bee890 100644 --- a/parser/html/nsHtml5Tokenizer.cpp +++ b/parser/html/nsHtml5Tokenizer.cpp @@ -2360,11 +2360,8 @@ stateloop: 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); }