Skip to content

abbr tag not parsed correctly #254

@julienc91

Description

@julienc91

Hi,

A bug seems to be affecting the parsing of the abbr tag:

> const { parse } = require("node-html-parser")
> parse("<a>foo</a>").querySelector("a").innerText
'foo'
> parse("<abbr>foo</abbr>").querySelector("abbr").innerText
'\n'

I was able to reproduce this bug on Node 16.15 with versions 6.1.9 and 6.1.10 of the package. In 6.1.8, everything works as expected:

> parse("<abbr>foo</abbr>").querySelector("abbr").innerText
'foo'

I couldn't find other tags with a similar behaviour.

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