<div style="display: flex; flex-wrap: wrap; white-space: pre-wrap; align-items: center; "><img height="20" width="20" style="border-radius:50%; margin-right: 4px;" decoding="async" src="https://avatars.githubusercontent.com/u/1231218?s=20&v=4" /><strong>1ec5</strong> left a comment <a href="https://github.com/openstreetmap/openstreetmap-website/issues/6407#issuecomment-3324004178">(openstreetmap/openstreetmap-website#6407)</a></div>
<p dir="auto">The <a href="https://wiki.openstreetmap.org/wiki/Key:website" rel="nofollow"><code class="notranslate">website=*</code></a> key has long been documented as requiring a protocol for the sake of data consumers, and most data consumers expect it. Validators like Osmose already warn about malformed URLs. iD used to but regressed: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="3445151136" data-permission-text="Title is private" data-url="https://github.com/openstreetmap/iD/issues/11436" data-hovercard-type="issue" data-hovercard-url="/openstreetmap/iD/issues/11436/hovercard" href="https://github.com/openstreetmap/iD/issues/11436">openstreetmap/iD#11436</a>. Most users probably copy-paste URLs rather than typing them in manually, but if users find it tedious, the validator warning could come with a button to automatically add a protocol. Arguably, leaving the URL unlinked would be valuable feedback to the mapper that something is wrong.</p>
<p dir="auto">In principle, <code class="notranslate">website=*</code> should be just a single URL, so we don’t have to guess the boundaries of a URL within running text, which can be tricky (think parentheses). However, there are <a href="https://qlever.cs.uni-freiburg.de/osm-planet/bZW8Y7" rel="nofollow">about 2,200</a> occurrences of <a href="https://wiki.openstreetmap.org/wiki/Semi-colon_value_separator" rel="nofollow">semicolon-delimited value lists</a>, which clashes with about <a href="https://qlever.cs.uni-freiburg.de/osm-planet/AgZe7E" rel="nofollow">700 occurrences</a> of URLs that might legitimately contain semicolons under RFC 1738.</p>
<p dir="auto">Incidentally, we’re optimistically linkifying URLs inside other freeform text keys like <code class="notranslate">source=*</code>. This works <a href="https://www.openstreetmap.org/way/86216802" rel="nofollow">when there’s a full URL</a>, and in the very common case that the source is <a href="https://www.openstreetmap.org/node/1005425725" rel="nofollow">merely a domain name</a>, it seems to be working too. So we do still have the capability of forming a correct link out of a partial URL.</p>
<p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="3231376161" data-permission-text="Title is private" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/6197" data-hovercard-type="pull_request" data-hovercard-url="/openstreetmap/openstreetmap-website/pull/6197/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/pull/6197">#6197</a> integrated tag2link, which has <a href="https://github.com/JOSM/tag2link/blob/e09148b173b7ef6c74988a28e4ef1a218e4cb374/index.json#L3004">a rule for <code class="notranslate">website=*</code> specifically</a>. As part of the integration, we skip tag2link in favor of the preexisting linkifier if it starts with HTTP or HTTPS:</p>
<p dir="auto"><a href="https://github.com/openstreetmap/openstreetmap-website/blob/8bd509b7caba7b1b17ee508ae7e049938bf398ba/app/helpers/browse_tags_helper.rb#L139-L140">https://github.com/openstreetmap/openstreetmap-website/blob/8bd509b7caba7b1b17ee508ae7e049938bf398ba/app/helpers/browse_tags_helper.rb#L139-L140</a></p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/issues/6407#issuecomment-3324004178">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLJQBTYI7GEBQDJUE2L3UFCTVAVCNFSM6AAAAACHDI33ZGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTGMRUGAYDIMJXHA">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLIES3ILVNAHZO446FL3UFCTVA5CNFSM6AAAAACHDI33ZGWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTWGEBDVE.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/openstreetmap-website/issues/6407/3324004178</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/issues/6407#issuecomment-3324004178",
"url": "https://github.com/openstreetmap/openstreetmap-website/issues/6407#issuecomment-3324004178",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>