prevents body comments to accept html a tags, sanitize them out instead as well
This commit is contained in:
@@ -2,7 +2,7 @@ module TextWithLinksHelper
|
||||
|
||||
def text_with_links(text)
|
||||
return unless text
|
||||
sanitized = sanitize text, tags: %w(a), attributes: %w(href)
|
||||
sanitized = sanitize text
|
||||
Rinku.auto_link(sanitized, :all, 'target="_blank" rel="nofollow"').html_safe
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user