accepts no html tags in text_with_links sanitize

This commit is contained in:
David Gil
2015-09-10 20:42:57 +02:00
parent 5ecbe01d47
commit ec4119582c

View File

@@ -2,7 +2,7 @@ module TextWithLinksHelper
def text_with_links(text)
return unless text
sanitized = sanitize text
sanitized = sanitize text, tags: [], attributes: []
Rinku.auto_link(sanitized, :all, 'target="_blank" rel="nofollow"').html_safe
end