[openstreetmap-website] Clicking wikipedia-link with a section does not always work (#967)

daganzdaanda notifications at github.com
Thu May 14 14:24:44 UTC 2015

> you have removed the  uselang  parameter!

I just copied the urls, seems like OverpassTurbo did remove that.

>  irrelevant confusion about umlauts

Maybe its a separate issue, but there is an issue nonetheless.
As shown, an Umlaut in a section is not "escaped" correctly, so the link does not work.

Node: http://www.openstreetmap.org/node/1383144922
Tag: `wikipedia=de:Alte Brücke (Heidelberg)#Brückenaffe`

The link that the website generates does not work:

The link that OverpassTurbo generates does work:
Note that it is transformed into this URL: 
An umlaut in the section breaks the link, but is OK in the main part?!

Adding the `uselang` breaks the link again:

even escaping the "ü" in the section does not work:

...except when you use the # instead of %23:

To sum it up:
* The section-part needs any umlauts (and ß) escaped, but with a dot instead of %. I haven't checked other non-ascii letters.
* The dash needs to be a dash and not escaped if there is a uselang-part
* Spaces need to be turned into underscores in the section part and could also be underscores in the main part

> The question is, is this really a bug in the web site code? or is the data in the database wrong?

The wiki currently says to 
*use the human readable title of the article, for example 'en:St Paul's Cathedral' rather than the version with underscores and html encoded characters that is used in the URL ('St_Paul%27s_Cathedral')*
It does not mention the special case of links to sections. 

Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20150514/7b7b0701/attachment.html>

More information about the rails-dev mailing list