Merge pull request #3131 from AndrewKvalheim/nofollow
Set `nofollow` on user-generated links
This commit is contained in:
commit
8b909a95c9
2 changed files with 14 additions and 1 deletions
|
|
@ -202,7 +202,7 @@ module FormatHelper
|
|||
safe_links_only: true
|
||||
}
|
||||
markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML.new(render_options), markdown_options)
|
||||
sanitize(markdown.render(text))
|
||||
sanitize(sanitize(markdown.render(text)), scrubber: Loofah::Scrubbers::NoFollow.new)
|
||||
end
|
||||
|
||||
def markdown_hint(text='')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue