mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-10-02 01:15:00 -04:00
Hooks into the xml5ever parse_error callback to capture parse errors and reject malformed XML. Because of this stricter error handling, we need to do some input pre-processing for edge cases (thank you WPT). We need to strip out <!DOCTYPE svg [ <!ENTITY ...> ]> which comes form Illustrator SVG export since that now causes errors (but should be ignored). Finally, by default xml5ever closes any opened tags at the end of the stream. Per WPT, these should be invalid. The rust work was all Claude-driven.