[openstreetmap/openstreetmap-website] Url-encode "?" characters in wikipedia tag values (PR #4855)

Anton Khorev notifications at github.com
Thu May 30 02:09:43 UTC 2024


> (for example, a wikipedia link with a forward slash in the title, if that's possible)

Forward slashes don't need to be escaped. `(`, `)`, `:` also don't need to be escaped.

> I think we should look for something that encodes url components

Are you also against replacing ` ` with `_`? That's something a standard url encoder is not going to do.

This is what you're going to get with `ERB:Utils`:
```
https://de.wikipedia.org/wiki/de:Englischer Garten (München)?uselang=en#Japanisches_Teehaus
https://de.wikipedia.org/wiki/de%3AEnglischer%20Garten%20%28M%C3%BCnchen%29?uselang=en#Japanisches_Teehaus
```

https://datatracker.ietf.org/doc/html/rfc3986#section-3.3

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

Message ID: <openstreetmap/openstreetmap-website/pull/4855/c2138543460 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240529/aaa3884b/attachment-0001.htm>


More information about the rails-dev mailing list