closure-library icon indicating copy to clipboard operation
closure-library copied to clipboard

`goog.Uri.getPath` returns partially decoded value

Open p-himik opened this issue 5 years ago • 2 comments

(new goog.Uri('http://example.com/%25_%5C')).getPath()
=> "/%25_\"

I would expect either "/%25_%5C" or "%_\", but not something in between.

p-himik avatar Aug 03 '20 21:08 p-himik

In general I'd encourage you to use the new URL module if possible.

It seems that this is because %25 is considered a reserved character (although it's not listed as such in the relevant RFC). I think all the get* methods might be missing calls to removeDoubleEncoding_ that would fix this.

12wrigja avatar Aug 04 '20 03:08 12wrigja

Given that goog.url handles this correctly and is encouraged for most use cases, this doesn't seem likely that we're going to get to this.

shicks avatar Sep 28 '20 21:09 shicks