airbnb / airbnb/DeepLinkDispatch

Problem in URLs that contains brackets

Open
#110 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Kotlin
Stars
4.4k
Forks
414
PR merge metrics
No merged PRs in 30d

Description

When I passed a URL that contains brackets "(" or ")" the matcher couldn't match it with any of the URL's. For an example, here's a sample class that I annotated with a URL,

```
@DeepLink("https://www.example.com/{id}")
public class ProductInfoActivity {
Intent i = getIntent();
if (i.getBooleanExtra(DeepLink.IS_DEEP_LINK, false)) {
Bundle parameters = i.getExtras();
String idString = parameters.getString(DeepLinkConstants.ID);
...
}
}
```

This class isn't brought to life when I pass in a URL that is like https://www.example.com/abc-def-(gh-i)-jkl-m2016.html, though it works seamlessly for something like https://www.example.com/abc-def-gh-i-jkl-m2016.html.

Contributor guide

Open the contributing guide

Research direction

Start by tracing how the DeepLink annotation is processed and how the URL matcher handles the example URL containing parentheses. Reproduce the failing case with https://www.example.com/abc-def-(gh-i)-jkl-m2016.html, compare it with the working URL, and verify that ProductInfoActivity is brought to life with the expected id parameter when the issue is fixed.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
mobile-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.