Autolinker.js
Autolinker.js copied to clipboard
URLs with credentials are not parsed correctly
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