環境
- Rails
- Redcarpet
オプションあった
みんなゴリゴリ書いてるけど一発でいけたわ
render_options = {
link_attributes: { rel: 'nofollow', target: '_blank' }
}
renderer = Redcarpet::Render::HTML.new(render_options)
これでrel="nofollow" target="_blank"が付加される
みんなゴリゴリ書いてるけど一発でいけたわ
render_options = {
link_attributes: { rel: 'nofollow', target: '_blank' }
}
renderer = Redcarpet::Render::HTML.new(render_options)
これでrel="nofollow" target="_blank"が付加される