[openstreetmap/openstreetmap-website] Ampersand in place name shown as "&" in reverse-geocoding search result (#1690)

Nutchanon Wetchasit notifications at github.com
Mon Nov 27 09:24:42 UTC 2017


I ran into a minor issue of OpenStreetMap.org's search interface when I was verifying recently-entered data: If I used "Show address" right-click menu on a place which its name has an ampersand character, it will be displayed as `&` escape sequence in the search result rather than a literal `&`.

Exact steps to reproduce:

- Start a browser (with JavaScript enabled).
- Go to the [main OpenStreetmap page](https://www.openstreetmap.org/).
- Go to coordinate [13.77088 N 100.50507 E at zoom level 19](https://www.openstreetmap.org/#map=19/13.77088/100.50507&layers=N).
- You will see a restaurant at the center of the map  ([screenshot](https://user-images.githubusercontent.com/5958794/33258781-4391ca20-d38d-11e7-9172-a1862ce0567c.png)).
- Right-click on the restaurant, choose "Show address".
- Reverse-geocoding search result [will show up](https://www.openstreetmap.org/search?query=13.77088%2C100.50507#map=19/13.77088/100.50507&layers=N).
- In the result, you would see that restaurant name is **shown as `MM Steak&Grill` rather than the correct `MM Steak&Grill`**. ([Screenshot](https://user-images.githubusercontent.com/5958794/33258827-6393e826-d38d-11e7-9bad-aba4cc8087e6.png))

Notes:

- I'm not sure if the problem affect characters other than ampersand or not (e.g. `<` and `>`).
- This problem **does not** affect searching by place name; i.e. typing `MM Steak&Grill` in the search box [shows correct name in the result](https://www.openstreetmap.org/search?query=MM%20Steak%26Grill#map=19/13.77088/100.50507&layers=N) ([screenshot](https://user-images.githubusercontent.com/5958794/33258881-90463158-d38d-11e7-9a4e-2838b995e08f.png)).
- This problem **does not** affect [place information display](https://www.openstreetmap.org/way/542901374#map=19/13.77087/100.50507&layers=N) ([screenshot](https://user-images.githubusercontent.com/5958794/33258902-a0245172-d38d-11e7-9076-2ce5b7ab6d57.png)).
- This problem **does not** affect search done directly on [nominatim.openstreetmap.org](https://nominatim.openstreetmap.org/), whether searching [by coordinate](https://nominatim.openstreetmap.org/search.php?q=13.77088%2C100.50507&polygon_geojson=1&viewbox=) ([screenshot](https://user-images.githubusercontent.com/5958794/33258932-bb23d89e-d38d-11e7-9a02-1040bb6653f9.png)) or [by place name](https://nominatim.openstreetmap.org/search.php?q=MM+Steak%26Grill&polygon_geojson=1&viewbox=) ([screenshot](https://user-images.githubusercontent.com/5958794/33258945-ca5412b6-d38d-11e7-98fc-606d33d91f3e.png)).
- This problem **does not** affect [place information display on nominatim.openstreetmap.org](https://nominatim.openstreetmap.org/details.php?place_id=220797400) ([screenshot](https://user-images.githubusercontent.com/5958794/33258980-eb943ba4-d38d-11e7-8c85-100f3754fb88.png)).
- The relevant changeset for this object at the time of this writing is [54092335](https://www.openstreetmap.org/changeset/54092335), authored by me through OpenStreetMap.org's Potlatch 2 editor. From a look at changeset XML, and results above, I believe this is not a data problem.

Browser: Opera 11.61 (Win32)
System: Microsoft Windows XP Professional SP3

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/1690
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20171127/a5a314e3/attachment.html>


More information about the rails-dev mailing list