]> git.openstreetmap.org Git - rails.git/blobdiff - app/helpers/application_helper.rb
Force all OpenLayers resources to load through the asset pipeline
[rails.git] / app / helpers / application_helper.rb
index 8073c2583d0f88b5f0d258f85e5b1448e11e8683..b256dac4c8fca11a91a95c16658138b5bb20fa55 100644 (file)
@@ -2,7 +2,7 @@ module ApplicationHelper
   require 'rexml/document'
 
   def sanitize(text)
-    Sanitize.clean(text, Sanitize::Config::OSM)
+    Sanitize.clean(text, Sanitize::Config::OSM).html_safe
   end
 
   def htmlize(text)
@@ -10,7 +10,11 @@ module ApplicationHelper
   end
 
   def linkify(text)
-    return Rinku.auto_link(text, :urls, tag_options(:rel => "nofollow"))
+    if text.html_safe?
+      Rinku.auto_link(text, :urls, tag_options(:rel => "nofollow")).html_safe
+    else
+      Rinku.auto_link(text, :urls, tag_options(:rel => "nofollow"))
+    end
   end
 
   def html_escape_unicode(text)