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

goog.Uri.getPath returns partially decoded value #1083

Open
p-himik opened this issue Aug 3, 2020 · 2 comments
Open

goog.Uri.getPath returns partially decoded value #1083

p-himik opened this issue Aug 3, 2020 · 2 comments
Assignees

Comments

@p-himik
Copy link

p-himik commented Aug 3, 2020

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

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

@12wrigja
Copy link
Collaborator

12wrigja commented Aug 4, 2020

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 12wrigja self-assigned this Aug 4, 2020
@shicks
Copy link
Member

shicks commented Sep 28, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants