[openstreetmap/openstreetmap-website] links to wikipedia section having diacritics do not work (#3269)

Andy Allan notifications at github.com
Wed Jul 28 14:28:50 UTC 2021


This is a conflict between the way we generate links to wikipedia sections, and manually specific anchors within the page itself.

We convert the anchors to the "dot" version, and have done for many years. You can see from the html sources that wikipedia automatically inserts anchors with the "dot" version of the section header:

![Screenshot from 2021-07-28 15-19-39](https://user-images.githubusercontent.com/360803/127339240-18bf8257-d634-4c81-b182-e34cf06d95c7.png)

This works fine for section headers. However, the anchor in question is a manually specified anchor:

![Screenshot from 2021-07-28 15-24-04](https://user-images.githubusercontent.com/360803/127339568-a680e423-f378-4327-b066-24a889ebff67.png)

>From the [English version of the "Template:Anchor"](https://en.wikipedia.org/wiki/Template:Anchor) page: "You can define one or more anchor names, separated by |." We can see that when we look at these anchors in the html source:

![Screenshot from 2021-07-28 15-19-53](https://user-images.githubusercontent.com/360803/127339851-6c5b7a26-697e-4fee-8e2d-60a3fe43648a.png)

So for manually specified anchors, wikipedia doesn't automatically add a "dot" version, unlike the section headers. And our logic - of automatically converting all fragments to the "dot" version, therefore breaks down.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/3269#issuecomment-888355729
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20210728/b00bf44f/attachment.htm>


More information about the rails-dev mailing list