linkifyjs
linkifyjs copied to clipboard
linkify-html tries to parse empty tags
Hi, when using linkify-html I've run into the following issue:
Example input: Foo/Bar <> Zoo/Zar
Expected output: same as the input (no change)
Observed output: Foo/Bar <zoo></zoo>
Hi @iskrenvankov, this is an issue with Linkify's HTML parser simple-html-tokenizer. I'd suggest filing this issue there or escaping your input before passing it to Linkify:
linkifyHtml(input.replace(/<>/g, '≶>'))
Hi @nfrasser thanks for the suggestion, in the end I did end up doing precisely that. Still, I'll raise it with simple-html-tokenizer.