mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 19:59:17 +00:00
LibWeb: Don't crash when appending to an XML document template element
When the XML parser appends child nodes to a template element, it must actually append the template element's contents. This special behavior caused us to return to the wrong parent element after adding child nodes to a template element, leading to a crash.
This commit is contained in:
parent
7cc718f1c1
commit
80ccb12a12
Notes:
github-actions[bot]
2025-07-14 07:16:52 +00:00
Author: https://github.com/tcl3
Commit: 80ccb12a12
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5429
Reviewed-by: https://github.com/gmta ✅
Reviewed-by: https://github.com/shannonbooth
4 changed files with 54 additions and 1 deletions
|
@ -41,6 +41,7 @@ private:
|
|||
Optional<FlyString> namespace_for_name(XML::Name const&);
|
||||
|
||||
GC::Ref<DOM::Document> m_document;
|
||||
GC::RootVector<GC::Ref<DOM::Node>> m_template_node_stack;
|
||||
GC::Ptr<DOM::Node> m_current_node;
|
||||
XMLScriptingSupport m_scripting_support { XMLScriptingSupport::Enabled };
|
||||
bool m_has_error { false };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue