<p></p>
<blockquote>
<p dir="auto">Can the dots in the key be url encoded? E.g. /user/preference/foo%2Ebar.xml for the key foo.bar?</p>
</blockquote>
<p dir="auto">Technically, yes. <code class="notranslate">%2E</code> is <code class="notranslate">.</code>. See <a href="https://www.ietf.org/rfc/rfc3986.txt" rel="nofollow">RFC3986</a> section 2.1 for details (<em>all</em> ASCII characters can be URL encoded, syntax is <code class="notranslate">%<char hex></code>)</p>
<p dir="auto">Unfortunately, <em>most</em> common URL encoders that people use <em>will not</em> encode <code class="notranslate">.</code> by default.</p>
<ul dir="auto">
<li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURI" rel="nofollow">JavaScript encodeURI</a></li>
<li><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/net/URLEncoder.html" rel="nofollow">Java URLEncoder</a><br>
In either case, doing a string replace of "." with "%2E" will fix the problem, but we would want to document that users <em>must</em> do so.</li>
</ul>
<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/3787#issuecomment-1317722848">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLKIR46DA364BCUR4VTWIVKA5ANCNFSM6AAAAAARZPOMC4">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLLSEKJL7SSM2RICESLWIVKA5A5CNFSM6AAAAAARZPOMC6WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSORLNOA.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/3787/c1317722848</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/3787#issuecomment-1317722848",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/3787#issuecomment-1317722848",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>