-
Notifications
You must be signed in to change notification settings - Fork 906
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
Notifications: apostrophe in name tag is printed as HTML code #3761
Comments
Some translation... b-unicycling has resolved one of your map notes near... More details about the note can be found at.... |
I'm trying to understand what sort of notification this is. After translation, looks like the response to resolving a note. https://www.openstreetmap.org/note/3402263 Is that right? Must be another note. The screenshot says "has solved" and 3402263 is not solved. So I assume in general it's the resolution to a note. Is that correct? (Btw some more context is helpful next time.) |
Is this in an email notification? |
Looks like the relevant code is notes_controller.rb:385, user_mailer.rb:127, and note_comment_notification.html.erb:4. |
Found the note in question https://www.openstreetmap.org/note/3389811 |
Call to Nominatim's reverse API returns this <?xml version='1.0' encoding='UTF-8'?>
<reversegeocode
attribution='Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright'
querystring='lat=52.6470900&lon=-7.2599700&zoom=14&accept-language=en'
timestamp='Sun, 23 Oct 22 19:23:58 +0000'>
<result
address_rank='22'
boundingbox='52.6467811,52.6475161,-7.2601399,-7.259252'
lat='52.6471289'
lon='-7.259824032278679'
osm_id='248749698'
osm_type='way'
place_id='167011389'
place_rank='22'
ref='Walkin's Lough Court'>
Walkin's Lough Court, Kilkenny No.1 Urban, Kilkenny, County Kilkenny, Leinster, Ireland
</result>
<addressparts>
<residential>Walkin's Lough Court</residential>
<city_district>Kilkenny No.1 Urban</city_district>
<town>Kilkenny</town>
<county>County Kilkenny</county>
<ISO3166-2-lvl6>IE-KK</ISO3166-2-lvl6>
<region>Leinster</region>
<ISO3166-2-lvl5>IE-L</ISO3166-2-lvl5>
<country>Ireland</country>
<country_code>ie</country_code>
</addressparts>
</reversegeocode> The encoded apostrophe here is fine. |
Got it working. Here's a snippet from my developer logs.
I need to check all callers of this function to make sure we're not introducing an issue with un-escapped special characters. Current solution is to replace result.to_s with result.value in nominatim.rb. |
URL
No response
How to reproduce the issue?
Expected behaviour
Notification displays regular apostrophe character
'
.Observed behaviour
Notification displays apostrophe as HTML code
'
.Walkin's Lough Court
https://www.openstreetmap.org/way/248749698/history
Screenshot(s) or anything else?
The text was updated successfully, but these errors were encountered: