Skip to content

Code in script block may break output #129

@07akioni

Description

@07akioni

Input:

<div>
  <script>
    console.log('</')
  </script>
</div>

Output:

[
  {
    "type": "element",
    "tagName": "div",
    "attributes": [],
    "children": [
      {
        "type": "text",
        "content": "\n  "
      },
      {
        "type": "element",
        "tagName": "script",
        "attributes": [],
        "children": [
          {
            "type": "text",
            "content": "\n    console.log('"
          },
          {
            "type": "attribute",
            "content": "<"
          },
          {
            "type": "tag-end"
          },
          {
            "type": "text",
            "content": "cript>\n"
          }
        ]
      }
    ]
  }
]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions