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

Check URLs from clipboard (getLinksFromText) does not support ipv6 #337

Open
3 tasks done
jonas-w opened this issue Mar 25, 2024 · 1 comment
Open
3 tasks done

Check URLs from clipboard (getLinksFromText) does not support ipv6 #337

jonas-w opened this issue Mar 25, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@jonas-w
Copy link

jonas-w commented Mar 25, 2024

Steps to reproduce

Use the "Check URLs from clipboard" button in the start screen with an URL which contains an ipv6 address e.g. "http://[::1]/"

Expected behavior

URLs with ipv6 addresses should be valid.

Actual behavior

A toast "no links detected" pops up.

URLCheck version

2.14

Android version

Android 14

Android Custom/Specific ROM or Device

GrapheneOS

Other details

The android.util.Patterns.WEB_URL pattern does not match ipv6 addresses.

static Set<String> getLinksFromText(CharSequence text) {

Acknowledgements

  • I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open issue.
  • I have written a short but informative title.
  • I will fill out all of the requested information in this form.
@jonas-w jonas-w added the bug Something isn't working label Mar 25, 2024
@TrianguloY
Copy link
Owner

TrianguloY commented Mar 26, 2024

That's an oddly specific bug, but an interesting one.

And yes, the problem is exactly what you mention, that official pattern doesn't allow them.

I want to allow the app to manage other non-http uris, so I'll probably use a more generic uri pattern (and maybe even let the user configure it? Hmm)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants