[openstreetmap/openstreetmap-website] Use URI.encode_uri_component when generating share urls (PR #5588)

Anton Khorev notifications at github.com
Sat Feb 1 18:19:21 UTC 2025


Fixes #5587.

I think it's safer to always use `URI.encode_uri_component` instead of `URI.encode_www_form_component`. Space is going to be encoded as `%20`. Space as `+` sometimes doesn't work.
You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/openstreetmap-website/pull/5588

-- Commit Summary --

  * Use URI.encode_uri_component when generating share urls

-- File Changes --

    M app/helpers/social_share_button_helper.rb (4)
    M test/helpers/social_share_button_helper_test.rb (7)

-- Patch Links --

https://github.com/openstreetmap/openstreetmap-website/pull/5588.patch
https://github.com/openstreetmap/openstreetmap-website/pull/5588.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5588
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/5588 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250201/aeb0edec/attachment.htm>


More information about the rails-dev mailing list