Skip to content

Replace URI.encode in Pegasus Template with URI::DEFAULT_PARSER.escape - #51446

Merged
Hamms merged 1 commit into
stagingfrom
update-yet-more-uri-encode
Apr 21, 2023
Merged

Replace URI.encode in Pegasus Template with URI::DEFAULT_PARSER.escape#51446
Hamms merged 1 commit into
stagingfrom
update-yet-more-uri-encode

Conversation

@Hamms

@Hamms Hamms commented Apr 20, 2023

Copy link
Copy Markdown
Contributor

The former is deprecated as of Ruby 2.7 and removed in Ruby 3, but the latter is a drop-in replacement.

Links

Testing story

[development] dashboard > URI.encode("Code.org and your child's privacy")
(irb):1: warning: URI.escape is obsolete
=> "Code.org%20and%20your%20child's%20privacy"
[development] dashboard > URI::DEFAULT_PARSER.escape("Code.org and your child's privacy")
=> "Code.org%20and%20your%20child's%20privacy"

The former is deprecated as of Ruby 2.7 and removed in Ruby 3, but the latter is a drop-in replacement.

- #30570
- #49848
@Hamms Hamms added the Ruby Update Everything related to work to update the version of Ruby our codebase runs on label Apr 20, 2023
@Hamms
Hamms requested review from breville and dju90 April 20, 2023 20:51
@Hamms
Hamms merged commit 7c3be72 into staging Apr 21, 2023
@Hamms
Hamms deleted the update-yet-more-uri-encode branch April 21, 2023 23:36
@Hamms Hamms mentioned this pull request Jun 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ruby Update Everything related to work to update the version of Ruby our codebase runs on

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants