Skip to content

[Navigation] Make deep link path arguments to not include slash - #153

Closed
osipxd wants to merge 1 commit into
androidx:androidx-mainfrom
osipxd:bugfix/184072811-deep-link-argument-slash
Closed

[Navigation] Make deep link path arguments to not include slash#153
osipxd wants to merge 1 commit into
androidx:androidx-mainfrom
osipxd:bugfix/184072811-deep-link-argument-slash

Conversation

@osipxd

@osipxd osipxd commented Apr 3, 2021

Copy link
Copy Markdown
Contributor

Proposed Changes

Slash is used for URI path splitting. Arguments should not include more than one path section.
I purpose to replace (.+?) with ([^/]+?) in resulting regexp.

Testing

Added corresponing tests to NavDestinationAndroidTest

Test: ./gradlew test connectedCheck

Issues Fixed

Fixes: b/184072811

Slash is used for URI path splitting. Arguments should not include more than one path section.

Test: ./gradlew test connectedCheck
Fixes: b/184072811
@googlebot

Copy link
Copy Markdown
Collaborator

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

1 similar comment
@google-cla

google-cla Bot commented Apr 3, 2021

Copy link
Copy Markdown

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@osipxd osipxd changed the title Make deep link path arguments to not include slash [Navigation] Make deep link path arguments to not include slash Apr 3, 2021
@osipxd

osipxd commented Apr 3, 2021

Copy link
Copy Markdown
Contributor Author

@googlebot I signed it!

@googlebot

Copy link
Copy Markdown
Collaborator

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

1 similar comment
@google-cla

google-cla Bot commented Apr 3, 2021

Copy link
Copy Markdown

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@osipxd
osipxd deleted the bugfix/184072811-deep-link-argument-slash branch April 15, 2021 19:21
@geak

geak commented Feb 2, 2022

Copy link
Copy Markdown

This breaks cases when argument needs to have a slash in it:

scheme://foo/{page}

page = bar/xyz

So DL scheme://foo/bar/xyz doesn't work 😢

@ianhanniballake

Copy link
Copy Markdown
Member

If you want special characters included as part of an argument, you should be encoding them via Uri.encode. Navigation will automatically decode them for you as part of its parsing.

@525411

525411 commented Feb 3, 2022 via email

Copy link
Copy Markdown

harryzz pushed a commit to harryzz/compose-multiplatform-core that referenced this pull request Jul 28, 2026
## Proposed Changes

Slash is used for URI path splitting. Arguments should not include more than one path section.
I purpose to replace `(.+?)` with `([^/]+?)` in resulting regexp.

## Testing

Added corresponing tests to `NavDestinationAndroidTest`

Test: ./gradlew test connectedCheck

## Issues Fixed

Fixes: [b/184072811](https://issuetracker.google.com/issues/184072811)

This is an imported pull request from androidx#153.

Resolves JetBrains#153
Github-Pr-Head-Sha: f16861b
GitOrigin-RevId: 5da0cf5
Change-Id: I9f147ead04b611febd2a3214cf8736b5a9afcc65
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants