[openstreetmap/openstreetmap-website] Stop Commons from redirecting outside CSP (PR #6202)
Anton Khorev
notifications at github.com
Fri Jul 18 07:02:26 UTC 2025
@AntonKhorev commented on this pull request.
> @@ -171,8 +171,8 @@
.addClass("bg-body-tertiary");
if (icon && OSM.WIKIMEDIA_COMMONS_URL) {
- let src = OSM.WIKIMEDIA_COMMONS_URL + "Special:Redirect/file/" + encodeURIComponent(icon);
- if (!icon.endsWith(".svg")) src += "?width=128";
+ let src = OSM.WIKIMEDIA_COMMONS_URL + "Special:Redirect/file/" + encodeURIComponent(icon) + "?mobileaction=toggle_view_desktop";
A longer comment can be added to the commit message, to avoid making whoever finds this change looking up its pull request.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6202#discussion_r2215181308
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/6202/review/3032264373 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250718/2310b597/attachment.htm>
More information about the rails-dev
mailing list