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

Need to encode URLs for schemes that use query parameters #148

Open
quinncomendant opened this issue Apr 16, 2018 · 0 comments
Open

Need to encode URLs for schemes that use query parameters #148

quinncomendant opened this issue Apr 16, 2018 · 0 comments

Comments

@quinncomendant
Copy link
Contributor

For a podcasts with a URL such as:

http://example.com/feed?id=123

This is fine when used with a simple app scheme, like this:

podcast://example.com/feed?id=123

However, if the app uses a scheme with query parameters such as overcast://x-callback-url/add?url= the URL doesn't work. In the following example, it does not invoke the Overcast subscribe callback, I think because of the double ?, so part of the query is ignored:

overcast://x-callback-url/add?url=http://example.com/feed?id=123

To fix this case, the podcast URL should be encoded at least as much as this:

overcast://x-callback-url/add?url=http://example.com/feed%3Fid=123

Or probably safer to encode the entire URL:

overcast://x-callback-url/add?url=http%3A%2F%2Fexample.com%2Ffeed%3Fid%3D123

This needs to be done in clients_panel.coffee to determine if the URL needs encoding or not (because if a simple scheme is used, e.g., podcast://, URL encoding shouldn't be done).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant