Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#15172 closed defect (invalid)

JOSM cannot open file if it contains the char & in the url/name — at Version 3

Reported by: baditaflorin Owned by: team
Priority: normal Milestone:
Component: Core Version: latest
Keywords: Cc:

Description (last modified by stoecker)

When i try to open this file in JOSM, i get this error, that it`s cryptic and does not tell nothing about what the real error is.

http://i.imgur.com/JRR4xaK.png

This is happening because of the & in the url.
http://i.imgur.com/wTvVZqP.png

If i delete the & i will be able to load the file.
But this not solve the problem, this is a valid url.
Also, the same problem appears when adding a name that contains the char &

For the file fake_bbox_area14.osm, it will fail to load because of the & char.
http://i.imgur.com/EaEIOVe.png

If you try and download the data, it will work.
You can try to download this intersection from here
https://www.openstreetmap.org/#map=20/40.8225406908153/-73.94183800888834

Change History (5)

by baditaflorin, 8 years ago

Attachment: fake_bbox_area158.osm added

by baditaflorin, 8 years ago

Attachment: fake_bbox_area14.osm added

comment:1 by bastiK, 8 years ago

The error message may be cryptic, but it is correct. In an XML document, the "&" character needs to be written as "&". It is outside the scope of the JOSM project to improve the error messages of the Java XML library.

comment:2 by bastiK, 8 years ago

Resolution: invalid
Status: newclosed

comment:3 by stoecker, 8 years ago

Description: modified (diff)

The error message may be cryptic, but it is completely valid. For XML "&step" is an entity (like & is) and this entity is unfinished as the ';' is missing.

In case of XML errors try xmllint (or any other XML validator) as a second instance.

Please tell the developers of the software creating the file that they should fix their XML export.

Note: See TracTickets for help on using tickets.