From 1ebbb0af0329192f4766fee671bc473a88b9e3e4 Mon Sep 17 00:00:00 2001 From: Henri Sivonen Date: Fri, 14 Feb 2020 13:24:59 +0100 Subject: [Parser] Move setting context to null to the correct location. --- .../java/htmlparser/src/nu/validator/htmlparser/impl/TreeBuilder.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'parser/html/java') 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 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 implements TokenHandler, public final void endTokenization() throws SAXException { formPointer = null; headPointer = null; + contextName = null; + contextNode = null; deepTreeSurrogateParent = null; templateModeStack = null; if (stack != null) { -- cgit v1.2.3