-
Notifications
You must be signed in to change notification settings - Fork 476
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
URI.readble throws an exeption #163
Comments
yes, because you have a malformed URI: decodeURIComponent("Adventure+Partners+K%F6ysitoiminnan+perustaitoja+geok%E4tk%F6ilij%F6ille"); It is .decodePathSegment() that is calling decodeURIComponent without handling a possible exception like it's done in .decodeQuery(). |
My example is actually inside var URI.withinString('xyz', function(uli) {}) callback. Now I checked the documentation again and I see that there's ``var uri = new URI(url);` but the readble() needs to be called on url not uri. I'll fix my code. |
Actually there's an error in the docs
Url is a string and doesn't have readable(). Seems that the only way to handle any user generated input is to catch the exception in the callback. |
both problems are fixed in master and will be released with the next version. |
Thanks. Appreciated! |
Throws an exception: Uncaught URIError: URI malformed. The problem is at least %F6, it's supposed to encode finnish letter ö.
Browser is Google Chrome 38 beta on Mac. There wasn't mention in the docs that readble can throw so I decided to open an issue.
The text was updated successfully, but these errors were encountered: