Skip to content

Entity after script tag results in HTML being copied. #285

@galenhuntington

Description

@galenhuntington

Minimal HTML example

<style>a{}</style>&apos;<br/>

Observed output

'<br/>

Expected output

'

Version information

  • html-to-text: 9.0.4
  • node: 18.14.2

The problem seems to arise with either a <script> or <style> block, followed by text with an entity (&blah;). HTML afterwards gets copied over literally without any further text conversion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions