elm / url

Build and parse URLs. Useful for HTTP and "routing" in single-page apps (SPAs)
https://package.elm-lang.org/packages/elm/url/latest/
BSD 3-Clause "New" or "Revised" License
75 stars 43 forks source link

s should call percentDecode before matching segment #20

Closed malaire closed 3 years ago

malaire commented 5 years ago

Url.Parser.s doesn't percentDecode path segments for matching so it returns Nothing instead of match if percent-encoding is used.

Erudition commented 5 years ago

16 , no?

malaire commented 3 years ago

While according to RFC 3986 segments should be percent-decoded before matching, making e.g. segments %6f, %6F and o equivalent, according to newer URL Living Standard decoding is not done making those three segments non-equivalent.

The URL Living Standard is a bit vague about the intended behavior so here's an issue I opened about the standard and where I got answer that decoding should not be done: https://github.com/whatwg/url/issues/565