Skip to content

incorrect code point output in decodeHTML #2331

Description

@6lvkro

This issue occurs when a complete entity name has no legacy (semicolon-less) form and is followed by a character that cannot continue the name. Since version 7.0.0, it emits a code point unrelated to the name being matched and incorrectly consumes the trailing character.

This behavior was confirmed to work correctly in version 6.0.1.

decodeHTML("&Xi$");   // 6.0.1: "&Xi$"   7.0.0+: "Â"
decodeHTML("&Chi)");  // 6.0.1: "&Chi)"  7.0.0+: "Á"
decodeHTML("&eta8");  // 6.0.1: "&eta8"  7.0.0+: "\uDD05p"
decodeHTML("&Psi-");  // 6.0.1: "&Psi-"  7.0.0+: "pf"

Unlike #2208, which involved a legacy form, this issue has no legacy form.

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