You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Updated the DOMParser.parseFromString and Parsing and serializing XML pages with better error handling.
Motivation
According to the HTML standard, when encountering non-conforming input, the XML parser produces a <parsererror> node as the root of the resulting XMLDocument. However, in Safari and Chrome, this node is not always the root.
I would also take this chance to clarify that the DOMParser doesn't do any SVG-specific magic when using image/svg+xml MIME type, can I do it in this PR or shall I submit a separate one?
I would also take this chance to clarify that the DOMParser doesn't do any SVG-specific magic when using image/svg+xml MIME type, can I do it in this PR or shall I submit a separate one?
...and thanks for asking about this! I'd prefer a separate PR. I'll review this one today, so you're not left hanging :).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Updated the
DOMParser.parseFromStringandParsing and serializing XMLpages with better error handling.Motivation
According to the HTML standard, when encountering non-conforming input, the XML parser produces a
<parsererror>node as the root of the resulting XMLDocument. However, in Safari and Chrome, this node is not always the root.Supporting details
Related issues
Fixes #9380.
Metadata