Skip to content

Use decodeUri on path segments #32

@sethwklein

Description

@sethwklein

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions