Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

Invalid JSON returned for locations with control characters in the display name. #5409

Open
openstreetmap-trac opened this issue Jul 23, 2021 · 0 comments

Comments

@openstreetmap-trac
Copy link

Reporter: s.tannenbaum[at]psilogistics.com
[Submitted to the original trac issue database at 10.10am, Monday, 1st August 2016]

The following query returns an invalid JSON string.

http://nominatim.openstreetmap.org/search?q=Kragujevac+34000&format=json

The answer contains the display string followed directly by several copies of the '7f' ISO control character before the closing quote. This causes parser errors for receiving applications. The JSON spec requires all control characters in strings to be escaped, in this case as \u007f.

The presence of the control character is probably just an error in the source data, but Nominatim should still return correctly encoded JSON in that case.

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

No branches or pull requests

1 participant