Overpass Turbo preview card causes corruption of query from misinterptation of whitespace or tabs

What and who is affected by this issue/request?

Overpass Turbo users. Basically everyone that needs to check OSM data.

Where on the platform does it happen?

Draft comment preview, and the rendered sent comments. Can it even be disabled, or changed to inline title preview?

How do we replicate the issue?

Shortlink:

Long link:

[out:json][timeout:30];
node(id:1085925753,6866498286);
convert+MyType+osm_type+=+type(),+::id=+id(),+::geom+=+geom(),+
+++++++++++++++++tourism+=+t["tourism"],++
+++++++++++++++++name+=+t["name"],+
+++++++++++++++++ele+=+t["ele"],+
+++++++++++++++++website+=+t["website"];+
out+geom;+

Redundant plus signs are added. This prevents queries from being run.
I don’t know whether it is caused by misencoding in percent-coding.
https://overpass-turbo.eu/?Q=%5Bout%3Ajson%5D%5Btimeout%3A30%5D%3B%0Anode%28id%3A1085925753%2C6866498286%29%3B%0Aconvert+MyType+osm_type+%3D+type%28%29%2C+%3A%3Aid%3D+id%28%29%2C+%3A%3Ageom+%3D+geom%28%29%2C+%0A+++++++++++++++++tourism+%3D+t%5B%22tourism%22%5D%2C++%0A+++++++++++++++++name+%3D+t%5B%22name%22%5D%2C+%0A+++++++++++++++++ele+%3D+t%5B%22ele%22%5D%2C+%0A+++++++++++++++++website+%3D+t%5B%22website%22%5D%3B+%0Aout+geom%3B+&C=43.76837%3B11.88927%3B12
Workaround is to not use links on their own line, preventing the preview card from appearing. overpass turbo overpass turbo

Expected behavior (i.e. solution)

  • Short link: Not expanding to a wrong link
  • Long link: Not changing the link

Other Comments

Maybe it is also a problem from the Overpass Turbo side. But best fixed here first.

The space is double encoded. It should be
https://example.com/?Q=%20
or https://example.com/?Q=+,
but it is https://example.com/?Q=%2B which is an encoded plus sign.

So whatever generates this links should be fixed.

1 Like

Found the origin of the link in question. Various test posts follow

This is broken. By contrast

https://overpass-turbo.eu/s/1FWs

works fine. Using a link text works fine as well.

The source of this:

[https://overpass-turbo.eu/s/1FWs](https://overpass-turbo.eu/s/1FWs)

resp.

[a link text](https://overpass-turbo.eu/s/1FWs)

The punch line is that there is some misguided attempt (this bug called “comment preview” in the first post) in the Discourse software to resolve the link for some reason. This might be under our control, as it is extremely unlikely that an OSM unspecific Discourse instance has a specialized link tool for Overpass Turbo.

1 Like

Test post per eMail.

The link per link text.

The link itself:
https://overpass-turbo.eu/s/1FWs

Bare link:

Bare link separated with empty lines

Everything as quotation:

Apparently, there is an independent bug that ate the quotation.

1 Like