<p></p>
<p dir="auto">Merged, thanks!</p>
<blockquote>
<p dir="auto">Urls will get uglier, especially non-English ones.</p>
</blockquote>
<p dir="auto">But the URLs aren't shown (in their percent-encoded form) in most places to most users. For example, I use Firefox, and both when hovering over the link, and then in the url bar after clicking the link, the unencoded form is shown (i.e. no encoding, therefore no ugliness).</p>
<p dir="auto">What I would prefer, is rather than <code class="notranslate">u s.tr(" ", "_")</code> is to avoid using the (mediawiki-specific) underscores, and just percent-encode everything. That would lead to simpler code too.</p>
<div class="highlight highlight-source-diff" dir="auto"><pre class="notranslate"><span class="pl-md"><span class="pl-md">-</span> url = "https://#{lang}.wikipedia.org/wiki/#{wiki_encode(title)}?uselang=#{I18n.locale}"</span>
<span class="pl-md"><span class="pl-md">-</span> url += "##{wiki_encode(section)}" if section</span>
<span class="pl-mi1"><span class="pl-mi1">+</span> url = "https://#{lang}.wikipedia.org/wiki/#{url_encode(title)}?uselang=#{I18n.locale}"</span>
<span class="pl-mi1"><span class="pl-mi1">+</span> url += "##{url_encode(section)}" if section</span>
</pre></div>
<p dir="auto">But in the grand scheme of things, this isn't important, and so I'm happy to merge as-is.</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/pull/4887#issuecomment-2178765000">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLNMD5MPCZXDBTVJN73ZIGDW5AVCNFSM6AAAAABI77KJIOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZYG43DKMBQGA">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLOK34Z5WL6DC5JAJLDZIGDW5A5CNFSM6AAAAABI77KJIOWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTUB3VIMQ.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/pull/4887/c2178765000</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/pull/4887#issuecomment-2178765000",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/4887#issuecomment-2178765000",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>