Skip to content

does not fix mismatching tags #247

@John-B

Description

@John-B

DOMDocument::Serialize, which is called by Drupal's Html::normalize before Drupal 10, appears to fix mismatching tags, but HTML5-php does not.

With DOMDocument, Html::normalize() on <h3>Heading</h2> is giving <h3>Heading</h3>.
With HTL5-php, Html::normalize() on <h3>Heading</h2> is giving <h3>Heading</p>.

Arguably not a bug, though it has caused a regression in one use case (https://www.drupal.org/project/toc_api/issues/3416816)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions