Skip to content

Commit

Permalink
get_text("reversegeocode/result") returns an XML node. We want to get…
Browse files Browse the repository at this point in the history
… the text value of that node.

This will unescape ' into an apostrophe.

All callers of this function will later re-encode it depending out output whether it be HTML in an email, or XML in an RSS feed.

* app/mailers/user_mail.rb
* app/helpers/geocode_helper.rb
* app/views/api/notes/feed.rss.builder
* app/views/api/notes/_note.rss.builder

Fixes openstreetmap#3761
  • Loading branch information
openbrian committed Oct 23, 2022
1 parent 747f6c0 commit 8eb2abc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/nominatim.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def self.describe_location(lat, lon, zoom = nil, language = nil)
end

if response && result = response.get_text("reversegeocode/result")
result.to_s
result.value
else
"#{number_with_precision(lat, :precision => 3)}, #{number_with_precision(lon, :precision => 3)}"
end
Expand Down

0 comments on commit 8eb2abc

Please sign in to comment.