Skip to content

Don't allow block level elements inside an unclosed <p> tag #88

@DAreRodz

Description

@DAreRodz

It would be nice that Himalaya handles weird cases like browsers do, e.g. the following code:

<body>
  <p>
  <div></div>
</body>

In Himalaya, the resulting JSON is an element <p> wrapping an element <div>, like in this case:

<body>
  <p>
    <div></div>
  </p>
</body>

But browsers close the <p> tag before opening the <div>.

<body>
  <p></p>
  <div></div>
</body>

This is because a <p> element’s end tag may be omitted if the element is immediately followed by some tags, as indicated in the HTML5 spec.

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