Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zero width character in the URL of the pictures #3439

Closed
angoca opened this issue Oct 24, 2021 · 3 comments
Closed

Zero width character in the URL of the pictures #3439

angoca opened this issue Oct 24, 2021 · 3 comments
Labels

Comments

@angoca
Copy link

angoca commented Oct 24, 2021

When resolving the notes created from StreetComplete, and these notes includes a photo, the URL of the photo includes a zero width character, just before the p, after the first slash. I am resolving a lot of notes from JOSM, and the URL has a zero width that creates some issues when viewing in the browser or copying the URL.

This is the original URL from the note:

https://westnordost.de/​p/65715.jpg

When copy/pasting in the browser, it is converted into:

https://westnordost.de/%E2%80%8Bp/65715.jpg

The character is this e2 80 8b which is the 200+B in UNICODE.

I do not know why the application is adding this "invisible" character in the notes, but this is creating problems to see the picture.

One example of this kind of error could be seen at: https://www.openstreetmap.org/note/2900036 when editing from JOSM, and copy pasting the URL.

@angoca angoca added the bug label Oct 24, 2021
@westnordost
Copy link
Member

westnordost commented Oct 24, 2021

One example of this kind of error could be seen at: https://www.openstreetmap.org/note/2900036 when editing from JOSM, and copy pasting the URL.

It looks like there is something wrong with your browser. The URL in the HTML does not contain this unicode character. I can tap on it no problem and https://westnordost.de/p/65715.jpg (a church) will be displayed:

image

@mnalis
Copy link
Member

mnalis commented Oct 25, 2021

It also look OK in OSM notes dump, so StreetComplete is likely not the problem here:

% curl https://planet.openstreetmap.org/notes/planet-notes-latest.osn.bz2 | 
     pbzip2 -dc |  fgrep westnordost.de/ | grep -w 65715.jpg | hd
00000000  68 74 74 70 73 3a 2f 2f  77 65 73 74 6e 6f 72 64  |https://westnord|
00000010  6f 73 74 2e 64 65 2f 70  2f 36 35 37 31 35 2e 6a  |ost.de/p/65715.j|
00000020  70 67 3c 2f 63 6f 6d 6d  65 6e 74 3e 0a           |pg</comment>.|
0000002d

That being said, I've also seen that behavior lately in JOSM (testing 18193), but haven't had time yes to find what exactly causes the problem (I've upgraded underlying Debian and its Java too, as well as a JOSM and StreetComplete).

Interestingly problem for me seem to occur only when JOSM is started via webstart link in browser - and in those cases I cannot open link directly by clicking on it, but only by copy/pasting (after triple-clicking the link), which is when the bug manifests. If I start the JOSM from shell with java -jar josm-tested.jar direct clicking works. If I file the bug elsewhere, I'll link here just in case someone else stumbles upon it (or if someone else is faster, please go ahead, I'm somewhat swamped at the moment)

@mnalis
Copy link
Member

mnalis commented Nov 24, 2021

I've reported the bug at https://josm.openstreetmap.de/ticket/21597

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants