Skip to content

Words with number boundaries incorrectly treated as Links  #493

@neSpecc

Description

@neSpecc

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"

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions