Sanitize any user supplied HTML before doing link detection or the

sanitizer will strip the rel=nofollow attributes.
This commit is contained in:
Tom Hughes 2009-11-14 16:31:51 +00:00
parent 17445a44da
commit 41dfa42edd

View file

@ -1,6 +1,6 @@
module ApplicationHelper
def htmlize(text)
return sanitize(auto_link(simple_format(text), :link => :urls, :html => { :rel => "nofollow" }))
return auto_link(sanitize(simple_format(text)), :link => :urls, :html => { :rel => "nofollow" })
end
def html_escape_unicode(text)