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

Drop regex validating URL from intents #502

Merged

Conversation

ArnyminerZ
Copy link
Member

Purpose

See #500. URLs are not being stripped correctly.

Short description

Added more characters to the URL regex, and extended test in order to verify that more complex URLs work.

Checklist

  • The PR has a proper title, description and label.
  • I have self-reviewed the PR.
  • I have added documentation to complex functions and functions that can be used by other modules.
  • I have added reasonable tests or consciously decided to not add tests.

Signed-off-by: Arnau Mora <arnyminerz@proton.me>
@ArnyminerZ ArnyminerZ added the bug Something isn't working label Feb 3, 2025
@ArnyminerZ ArnyminerZ self-assigned this Feb 3, 2025
@ArnyminerZ ArnyminerZ linked an issue Feb 3, 2025 that may be closed by this pull request
@ArnyminerZ ArnyminerZ requested a review from sunkup February 3, 2025 17:49
Copy link
Member

@sunkup sunkup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we have this stripUrl method? It's been added in #247 but I am not sure we actually need it? In what use case does ICSx5 get passed a text as intent which we need to extract the HttpUrl from?

It's been causing issues before ...

Maybe dropping it and then just checking URL validity py parsing the string to a HttpUrl would cause less problems?

Signed-off-by: Arnau Mora <arnyminerz@proton.me>
Copy link
Member

@sunkup sunkup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good. I think trimming should suffice.

@sunkup sunkup merged commit afd03d8 into dev Feb 5, 2025
7 checks passed
@sunkup sunkup deleted the 500-ics-urls-are-cut-off-when-passed-from-davx5-to-icsx5 branch February 5, 2025 09:43
@sunkup sunkup changed the title Added more characters to url regex Drop URL regex Feb 13, 2025
@sunkup sunkup changed the title Drop URL regex Drop regex validating URL from intents Feb 13, 2025
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

Successfully merging this pull request may close these issues.

ICS URLs are cut off when passed from DAVx5 to ICSx5
2 participants