]> git.openstreetmap.org Git - rails.git/blobdiff - app/helpers/geocoder_helper.rb
Avoid some uses of html_safe
[rails.git] / app / helpers / geocoder_helper.rb
index 161bb2d6de57369c322c0e30ba5d50dc37c14850..1826b08a4f269354e52d44f7eb8d1ca0cd50e7ff 100644 (file)
@@ -14,13 +14,13 @@ module GeocoderHelper
       html_options[:data][key.to_s.tr("_", "-")] = value
     end
 
-    html = ""
+    html = []
     html << result[:prefix] if result[:prefix]
     html << " " if result[:prefix] && result[:name]
     html << link_to(result[:name], url, html_options) if result[:name]
     html << " " if result[:suffix] && result[:name]
     html << result[:suffix] if result[:suffix]
-    html.html_safe
+    safe_join(html)
   end
 
   def describe_location(lat, lon, zoom = nil, language = nil)