Stop Using Deprecated URI.escape (again) - #48556
Merged
Merged
Conversation
URI.escape (again)
URI.escape (again)URI.escape (again)
Hamms
marked this pull request as draft
October 12, 2022 18:14
Hamms
marked this pull request as ready for review
October 13, 2022 04:24
cat5inthecradle
approved these changes
Oct 13, 2022
8 tasks
Hamms
added a commit
that referenced
this pull request
Jan 3, 2023
> Identifies places where `URI.escape` can be replaced by `CGI.escape`, `URI.encode_www_form`, or `URI.encode_www_form_component` depending on your specific use case. Also this cop identifies places where `URI.unescape` can be replaced by `CGI.unescape`, `URI.decode_www_form`, or `URI.decode_www_form_component` depending on your specific use case. Most of the required changes were already applied in #48556 and #49140 (before I know this rule existed), but the linter caught a couple that my manual searches missed. - https://www.rubydoc.info/gems/rubocop/RuboCop/Cop/Lint/UriEscapeUnescape
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #46810, reapplying #46601.
Specifically, I applied all the same changes as in the original PR, but I used
ERB::Util.url_encoderather thanCGI.escapeto encode the URL string values that got messed up last time.Testing story
Verified that I repro the original issue on my local environment, and verified that this change fixes it.
PR Checklist: