Commit graph

4 commits

Author SHA1 Message Date
Tim Ledbetter
f607af9ff3 LibWeb: Use XML encoding rules for XML document loading
Previously, the XML document loading paths used the HTML encoding
sniffing algorithm to determine character encoding. After the chardetng
integration, this algorithm could return a non-UTF-8 encoding for XML
documents that did not specify a charset, causing non-ASCII UTF-8
content to be decoded incorrectly.

We now use BOM sniffing and default to UTF-8, per the XML specification.
2026-05-24 00:51:14 +02:00
Andrew Kaster
50422eb563 Tests: Add XHTML tests for CDATA, PIs and Comment nodes in the DOM 2025-07-19 14:56:20 +02:00
Cory Virok
6a5bca1302 LibWeb: Added tests for missing xmlns during XHMTL parsing
The main culprit for the following WPT test failure is that we
weren't using the HTML namespace for XHTML docs unless one was
explicitly provided.
2024-10-13 00:24:25 +02:00
Andreas Kling
007c292af3 LibWeb: Execute the correct script in XMLDocumentBuilder::element_end()
We were mistakenly executing the current node's script instead of the
document's pending parsing-blocking script.

This caused ~1000 WPT tests to time out, since we never ended up firing
a load event for XHTML pages that load multiple external scripts.
2024-07-25 15:05:28 +02:00