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

Use decodeUri on path segments #32

Open
sethwklein opened this issue Jan 29, 2017 · 1 comment
Open

Use decodeUri on path segments #32

sethwklein opened this issue Jan 29, 2017 · 1 comment
Labels

Comments

@sethwklein
Copy link

For some reason, I expected path segments to be decoded. Once I discovered the resulting bug in my code, I ended up using the following in place of string:

decodedString =
    custom "STRING" <| 
        \encoded ->
            case decodeUri encoded of
                Nothing ->
                    Ok encoded
                
                Just decoded ->
                    Ok decoded

The reason I considered this a bug is that I haven't thought of a case where I wouldn't use the above instead of string.

@process-bot
Copy link

Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it!

Here is what to expect next, and if anyone wants to comment, keep these things in mind.

@evancz evancz added the request label Jul 29, 2017
@evancz evancz changed the title Path segments aren't decoded Use decodeUri on path segments Jul 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants