summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibXML
diff options
context:
space:
mode:
authorAli Mohammad Pur <ali.mpfard@gmail.com>2023-05-05 02:09:14 +0330
committerJelle Raaijmakers <jelle@gmta.nl>2023-05-05 01:33:49 +0200
commit87e95ceb6994d4e8463dc60737eeaab73941d70e (patch)
tree7a7b81bac6fd86eb43f1ffb0e5c6dc080286a768 /Userland/Libraries/LibXML
parent0ab19dc4cd371948c520d7a9ce4f825c44d7dc4a (diff)
downloadserenity-87e95ceb6994d4e8463dc60737eeaab73941d70e.zip
LibXML: Notify the listener about the root node as well
We previously did not notify the listener about entering the root node, which caused the following snippet to produce the wrong output: a = new DOMParser a.parseFromString("<x/>", "text/xml").documentElement // != null
Diffstat (limited to 'Userland/Libraries/LibXML')
-rw-r--r--Userland/Libraries/LibXML/Parser/Parser.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibXML/Parser/Parser.cpp b/Userland/Libraries/LibXML/Parser/Parser.cpp
index f73a37fed2..4a6bce9614 100644
--- a/Userland/Libraries/LibXML/Parser/Parser.cpp
+++ b/Userland/Libraries/LibXML/Parser/Parser.cpp
@@ -74,7 +74,7 @@ void Parser::append_node(NonnullOwnPtr<Node> node)
m_entered_node->content.get<Node::Element>().children.append(move(node));
} else {
m_root_node = move(node);
- m_entered_node = m_root_node.ptr();
+ enter_node(*m_root_node);
}
}