1ec5 left a comment (openstreetmap/openstreetmap-website#6587)

> In general all the tags processed by tag2link/the linkifying code are 
> external values that we don't have any control over. Are we sure none of them 
> besides URLs contain semi-colons as a legal (non-OSM-list) value?

The reason for special-casing URLs is that we know a URL can validly contain a 
semicolon and can parse it both ways without any external lookup. By contrast, 
with a key like `wikipedia=*` or `wikimedia_commons=*`, we technically wouldn’t 
know if the semicolon serves as a delimiter without calling out to the 
MediaWiki API. We could employ some heuristics like looking for `;[-a-z]{2,}:`, 
but this could become a rabbit hole fast. If tag2link provides more information 
on the heuristics to use, we could adopt a two-pass approach for more keys.

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

Message ID: 
<openstreetmap/openstreetmap-website/pull/6587/[email protected]>
_______________________________________________
rails-dev mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/rails-dev

Reply via email to