X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/3377879d396a8c0e9df87cb438e7aaf2d90e991b..13289d404188bd397ee72852f66c415a2bb87066:/app/helpers/application_helper.rb?ds=sidebyside diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 8073c2583..b256dac4c 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -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)