mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
DOM pre-insertion validity allows processing instructions as children of a document. However, Document::is_child_allowed() still rejected them, so XML documents silently dropped valid processing-instruction nodes and produced the wrong sibling relationships. Processing instructions that appear inside a DTD subset are not document children and should not surface in the DOM tree. Ignore those SAX callbacks while libxml is parsing the subset so the XML parser builds the correct document structure.