Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Words with number boundaries incorrectly treated as Links #493

Closed
neSpecc opened this issue Nov 13, 2024 · 1 comment · Fixed by #498
Closed

Words with number boundaries incorrectly treated as Links #493

neSpecc opened this issue Nov 13, 2024 · 1 comment · Fixed by #498
Assignees
Labels

Comments

@neSpecc
Copy link

neSpecc commented Nov 13, 2024

When using Linkify.js to detect links in text, words with numbers as boundaries are incorrectly highlighted as links. For example, in the string "somefile.mp4", Linkify.js interprets "somefile.mp" as a link, omitting the final 4 character.

Actual behavior

linkifyHtml('some string with somefile.mp4 token') // "some string with <a href="somefile.mp">somefile.mp</a>4 token"

Expected behavior

Link should not be parsed

linkifyHtml('some string with somefile.mp4 token') // "some string with somefile.mp4 token"
@nfrasser
Copy link
Owner

nfrasser commented Dec 4, 2024

@neSpecc the fix for this is now available in the latest v4.2.0 release, thanks for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants
@nfrasser @neSpecc and others