Skip to content
New issue

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

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

Already on GitHub? # to your account

Are wildcard operators allowed in links? #37

Closed
mre opened this issue May 1, 2022 · 2 comments
Closed

Are wildcard operators allowed in links? #37

mre opened this issue May 1, 2022 · 2 comments

Comments

@mre
Copy link
Contributor

mre commented May 1, 2022

We received an interesting issue for lychee here: lycheeverse/lychee#604.
The gist is that links with wildcard operators (e.g. https://*.example.com) get properly extracted by linkify, but we cannot easily check them with lychee.

We now wonder if we should handle the exclusion of such wildcard URLs on our end or whether it's better to discard them right away with linkify.
From my perspective, these are valid links, so linkify is correct, but the behavior might be surprising to downstream users. Perhaps another config option could be introduced which would allow to skip such wildcard URLs:

let finder = LinkFinder::new().wildcards(false);

However there are other sub-delimiters, so I could understand if such cases won't be handled by linkify. In this scenario we would filter them in lychee instead.

@mre
Copy link
Contributor Author

mre commented May 1, 2022

Created a PR with the mentioned changes here: #38

@robinst
Copy link
Owner

robinst commented Jul 11, 2022

Those kinds of URLs are no longer extracted by linkify with 0.9.0: https://github.com/robinst/linkify/blob/main/CHANGELOG.md#090---2022-07-11

@robinst robinst closed this as completed Jul 11, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants