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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore URI.escape behaviour #181

Closed
mshka opened this issue Jan 12, 2018 · 0 comments
Closed

Restore URI.escape behaviour #181

mshka opened this issue Jan 12, 2018 · 0 comments
Labels
Milestone

Comments

@mshka
Copy link

mshka commented Jan 12, 2018

Hello 馃憢
Thank you for maintaining this gem!!

I want to raise another issue similar to #179

After updating to the latest version there was another breaking change when handling spaces in translation files

[1] pry(main)> URI.escape('space ')
=> "space%20"
[2] pry(main)> CGI.escape('space ')
=> "space+"

URI.escape and CGI.escape are a bit different https://stackoverflow.com/questions/2824126/whats-the-difference-between-uri-escape-and-cgi-escape#answer-13059657 and using gsub on CGI.escape should be avoided IMO since one of the reasons URI.escape was marked as obsolete is because it's just a simple gsub so I would like to propose restoring URI.escape behavior by using addressable gem -- reason: as mentioned here The closest to the URI spec seems to be the Addressable gem -- it will restore the URI.escape behavior while keeping the code free from any offenses

I made a PR to illustrate this change: #180

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

2 participants