Skip to content

changing CGI.escape to URI.encode to replace '+' with '%20' - #30570

Merged
dju90 merged 1 commit into
stagingfrom
share-partial-email-link-spaces
Sep 4, 2019
Merged

changing CGI.escape to URI.encode to replace '+' with '%20'#30570
dju90 merged 1 commit into
stagingfrom
share-partial-email-link-spaces

Conversation

@dju90

@dju90 dju90 commented Sep 3, 2019

Copy link
Copy Markdown
Contributor

This is to enable Outlook email clients opening the email link to render spaces instead of the '+' literally, which is what happens when CGI uses '+' as the separator.

URI.encode is an alias for URI.escape, which was deprecated in 2009. However, we use URI.encode in several other places in our codebase. Since the marketing wants to send out the CSP privacy notice tomorrow, this is a quick fix to address the spaces issue.

@dju90
dju90 requested a review from breville September 3, 2019 22:10

@breville breville left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per chat, this seems like a reasonable short-term fix, but there are some longer term options which are not deprecated. cc @davidsbailey

@dju90
dju90 merged commit 5ebaadb into staging Sep 4, 2019
@dju90
dju90 deleted the share-partial-email-link-spaces branch September 4, 2019 00:15
@dju90
dju90 restored the share-partial-email-link-spaces branch September 4, 2019 00:15
Hamms added a commit that referenced this pull request Apr 20, 2023
The former is deprecated as of Ruby 2.7 and removed in Ruby 3, but the latter is a drop-in replacement.

- #30570
- #49848
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants