Hypercontext / linkifyjs

JavaScript plugin for finding links in plain-text and converting them to HTML <a> tags.
https://linkify.js.org
MIT License
1.83k stars 182 forks source link

If string contains "<" greater sign then the next string from the greater then sign is getting excluded #440

Open ranjit-redekar opened 1 year ago

ranjit-redekar commented 1 year ago

Consider the below example, INPUT - the value of the old purchase is < the new purchase OUTPUT- the value of the old purchase is

"< the new purchase " this part is getting excluded from the actual string.

linkifyjs - 4.1.1 linkify-html - 4.1.1

Codesandbox link - https://codesandbox.io/s/linkify-html-example-ud7n80

nfrasser commented 1 year ago

Hi @ranjit-redekar, linkify-html does not support text with unencoded HTML entities such as < (should be encoded as &lt;. Try linkify-string instead https://linkify.js.org/docs/linkify-string.html