diff options
-rw-r--r-- | parser/html/java/htmlparser/src/nu/validator/htmlparser/impl/TreeBuilder.java | 4 | ||||
-rw-r--r-- | parser/html/nsHtml5TreeBuilder.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/parser/html/java/htmlparser/src/nu/validator/htmlparser/impl/TreeBuilder.java b/parser/html/java/htmlparser/src/nu/validator/htmlparser/impl/TreeBuilder.java index de7d8478d..c8fd9ee9b 100644 --- a/parser/html/java/htmlparser/src/nu/validator/htmlparser/impl/TreeBuilder.java +++ b/parser/html/java/htmlparser/src/nu/validator/htmlparser/impl/TreeBuilder.java @@ -705,8 +705,6 @@ public abstract class TreeBuilder<T> implements TokenHandler, tokenizer.setState(Tokenizer.DATA); } } - contextName = null; - contextNode = null; } else { mode = INITIAL; // If we are viewing XML source, put a foreign element permanently @@ -1614,6 +1612,8 @@ public abstract class TreeBuilder<T> implements TokenHandler, public final void endTokenization() throws SAXException { formPointer = null; headPointer = null; + contextName = null; + contextNode = null; deepTreeSurrogateParent = null; templateModeStack = null; if (stack != null) { diff --git a/parser/html/nsHtml5TreeBuilder.cpp b/parser/html/nsHtml5TreeBuilder.cpp index cea78839c..995e7f5e6 100644 --- a/parser/html/nsHtml5TreeBuilder.cpp +++ b/parser/html/nsHtml5TreeBuilder.cpp @@ -142,8 +142,6 @@ nsHtml5TreeBuilder::startTokenization(nsHtml5Tokenizer* self) tokenizer->setState(NS_HTML5TOKENIZER_DATA); } } - contextName = nullptr; - contextNode = nullptr; } else { mode = NS_HTML5TREE_BUILDER_INITIAL; if (tokenizer->isViewingXmlSource()) { @@ -579,6 +577,8 @@ nsHtml5TreeBuilder::endTokenization() { formPointer = nullptr; headPointer = nullptr; + contextName = nullptr; + contextNode = nullptr; deepTreeSurrogateParent = nullptr; templateModeStack = nullptr; if (stack) { |