workaround for iD bug #10761

the current version of iD (v2.31, before the fix for https://github.com/openstreetmap/iD/issue/10761: https://github.com/openstreetmap/iD/pull/10766), does not fully support `x-www-form-urlencoded` "query-style" strings in the hash: Specifically, spaces encoded as `+` will not be decoded back to ` `.

This workaround essentially temporarily reverts the behaviour of the website to the state before #5592, and can be dropped again with the next minor version upgrade of iD (`v2.32`).
This commit is contained in:
Martin Raifer 2025-02-12 14:08:19 +01:00 committed by GitHub
parent d642adc6e4
commit 051ae5953f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -33,5 +33,5 @@ $(document).ready(function () {
if (id.data("gpx")) params.set("gpx", id.data("gpx")); if (id.data("gpx")) params.set("gpx", id.data("gpx"));
id.attr("src", id.data("url") + "#" + params); id.attr("src", id.data("url") + "#" + params.toString().replace('+', '%20'));
}); });