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

Dataset IDs need to be URL-encoded #95

Closed
kring opened this issue Jun 29, 2017 · 0 comments
Closed

Dataset IDs need to be URL-encoded #95

kring opened this issue Jun 29, 2017 · 0 comments
Assignees

Comments

@kring
Copy link
Member

kring commented Jun 29, 2017

For example, try this search:
http://magda-dev.terria.io/search?q=ESTA+EMERGENCY+MARKERS

And then click on the first result. It goes to here, which is invalid:
http://magda-dev.terria.io/dataset/http://data-esta000.opendata.arcgis.com/datasets/df294d0463b44efd85f5e66f90825451_0

But this works fine:
http://magda-dev.terria.io/dataset/http%3A%2F%2Fdata-esta000.opendata.arcgis.com%2Fdatasets%2Fdf294d0463b44efd85f5e66f90825451_0

It's a little awkward to use a URL as an ID, but that's what this data.json source is doing so we have to deal with it. In any case, there are other reasons we should be URL-encoding the id. encodeURIComponent(id) will do the trick.

@kring kring mentioned this issue Jun 29, 2017
@kring kring self-assigned this Jun 29, 2017
@kring kring closed this as completed in 6b058e0 Jun 29, 2017
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