Skip to content

Conversation

@ediamin
Copy link
Collaborator

@ediamin ediamin commented May 17, 2022

Fixes #522

This PR fixes the uncaught DOMException: Not Found Error when the Document class tries to load a source that has no closing head and body tags and contains invalid node in the head tag. For example,

<html><head><meta name="foo" content="bar"><foo></foo><bar></bar>

With this fix, we will get a proper structured html like this,

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8" />
    <meta name="foo" content="bar" />
  </head>
  <body>
    <foo></foo><bar></bar>
  </body>
</html>

@ediamin ediamin requested a review from westonruter May 17, 2022 15:39
@ediamin ediamin added the DOM label May 17, 2022
Copy link
Member

@westonruter westonruter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ediamin ediamin merged commit 517f67b into main May 18, 2022
@ediamin ediamin deleted the fix/522-uncaught-domexception branch May 18, 2022 04:16
@westonruter westonruter added this to the 0.11.2 milestone Jun 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Uncaught DomException in Document::moveInvalidHeadNodesToBody

3 participants