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

Part of the query is removed when URL is passed in Intent #344

Merged

Conversation

ArnyminerZ
Copy link
Member

Purpose

See #342. A part of the query of URLs is stripped.

Short description

After adding a test case, I've discovered that the RegExp is not correct, it was not picking dots.

  • Updated Regex to ([a-zA-Z]+)://(\w+)(.\w+)*[\w.&?=*]*.
  • Added test case.

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 Gras <arnyminerz@proton.me>
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
@ArnyminerZ ArnyminerZ added the bug Something isn't working label Jun 11, 2024
@ArnyminerZ ArnyminerZ self-assigned this Jun 11, 2024
@ArnyminerZ ArnyminerZ linked an issue Jun 11, 2024 that may be closed by this pull request
@ArnyminerZ ArnyminerZ requested a review from sunkup June 11, 2024 07:12
@ArnyminerZ ArnyminerZ marked this pull request as ready for review June 11, 2024 07:13
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.

Does not work for me yet.

Try with the intent sent via adb activity manager:

$ adb shell am start-activity 'webcals://www.feiertage-deutschland.de/kalender-download/ics/feiertage-deutschland.ics?street=mystr.&housenumber=0'

the part &housenumber=0 is cut off.

@ArnyminerZ
Copy link
Member Author

Turns out is not a problem from Android but from the terminal/adb. This fails:

adb shell am start-activity "webcals://www.feiertage-deutschland.de/kalender-download/ics/feiertage-deutschland.ics?street=mystr.&housenumber=0"

But this works fine:

adb shell am start-activity "webcals://www.feiertage-deutschland.de/kalender-download/ics/feiertage-deutschland.ics?street=mystr.\&housenumber=0"

Note the \&. For some reason it's getting skipped if not escaped 🤷🏼

@ArnyminerZ ArnyminerZ requested a review from sunkup June 12, 2024 12:46
@sunkup
Copy link
Member

sunkup commented Jun 13, 2024

Okay, strange. But I guess we still want the fix and the test.

@sunkup sunkup merged commit 3acbdfc into dev Jun 13, 2024
7 checks passed
@sunkup sunkup deleted the 342-part-of-the-query-is-removed-when-url-is-passed-in-intent branch June 13, 2024 12:23
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.

Part of the query is removed when URL is passed in Intent
2 participants