Autolinker.js icon indicating copy to clipboard operation
Autolinker.js copied to clipboard

URLs with credentials are not parsed correctly

Open georgmu opened this issue 5 years ago • 0 comments

When a link includes username/password inside the URL (see userinfo in https://en.wikipedia.org/wiki/URL), the automatic linking is wrong.

For example, given the following URL: https://foo:[email protected]/foobar

Expected behavior:

The link is marked as link as it is (Link to https://foo:[email protected]/foobar)

Actual behavior:

There are two links (one http link and one mailto link) and some unlinked text:

Link https://foo
Unlinked text :
Link mailto:[email protected]
Unlinked text /foobar

georgmu avatar Nov 05 '19 09:11 georgmu