Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Remove URL unescaping for web URL sources. #338
When providing a web URL for the sound asset, if that URL contains
This commit removes the call to stringByRemovingPercentEncoding,
referenced this pull request
Jan 8, 2018
@trepidity Thanks for the quick response.
Don't like the whole section how? My understanding of the
Well, the library doesn't say how it wants the URL, but as a user I'd certainly expect that if I send a percent-encoded URL, that it would be ok with that. Perhaps it could also accept unencoded UTF-8 URL strings and percent-encode them, to be extra friendly to the user, but the one thing it CANNOT do is call
Again, I'm not sure what you mean by this? Remove which parts?
My use case is for a language learning app. Each flash card has some audio associated with it that is downloaded over the internet. I pull the card data (including the audio URL) from our API and get back a percent-encoded URL that I feed to RNS. I ran into this problem because our URLs are named after the words or phrases, and they often have non-ASCII UTF-8 in them. When one of those URLs (with percent-encoding in them) are fed to RNS, they fail because RNS is trying to decode them back to raw UTF-8 which causes the
Works (because it does not contain percent-encoded characters):
Fails (because it DOES contain percent-encoded characters):
The desired result is that both of those URLs will work. This PR allows them both to work.