[openstreetmap/openstreetmap-website] Fix Wikipedia tag handling to support multiple links (PR #6524)

Pablo Brasero notifications at github.com
Wed Nov 19 10:39:18 UTC 2025


@pablobm commented on this pull request.

Apart from my extremely nitpicky comment, the code looks good to me.

There's the question I posed at https://github.com/openstreetmap/openstreetmap-website/issues/6397#issuecomment-3328314366 of whether this should be allowed at all. I think that it should be allowed: if this is fair for Wikidata tags, then it should be fair for Wikipedia tags. There are good examples out there such as monuments depicting several notable people (like this [statue of the Obamas in Ireland](https://www.openstreetmap.org/node/10074619754#map=18/52.885049/-7.946060)), and probably other examples that my imagination can't reach for right now.

>  
-    link = wikipedia_link("foo", "Test")
-    assert_nil link
+    links = wikipedia_links("artist:wikipedia", "en:Pablo Picasso")
+    assert_equal 1, links.length
+    assert_equal "https://en.wikipedia.org/wiki/Pablo_Picasso?uselang=en", links[0][:url]
+    assert_equal "en:Pablo Picasso", links[0][:title]
+
+    links = wikipedia_links("architect:wikipedia", "en:Frank Lloyd Wright")
+    assert_equal 1, links.length
+    assert_equal "https://en.wikipedia.org/wiki/Frank_Lloyd_Wright?uselang=en", links[0][:url]
+    assert_equal "en:Frank Lloyd Wright", links[0][:title]
+
+    links = wikipedia_links("buried:wikipedia", "en:Westminster Abbey")

Suuuuper-nitpicky, but this example is a bit weird 😅 The value for this tag should be a person (or generally a formerly-living entity).

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

Message ID: <openstreetmap/openstreetmap-website/pull/6524/review/3478001641 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20251119/b5bfd461/attachment-0001.htm>


More information about the rails-dev mailing list