Railsでphpのstrip_tagsみたいなことをしたかったらstrip_tagsよりsanitize
strip_tags('<b class="bb" id="bbb" >Bold</b><a>Anchor</a>')
=> BoldAnchor
sanitize(
'<b class="bb" id="bbb" >Bold</b><a>Anchor</a>',
:tags => ["b"]
)
=> <b class="bb">Bold</b>Anchor
sanitize(
'<b class="bb" id="bbb" >Bold</b><a>Anchor</a>',
:tags => ["b"],
:attributes => ["id","class"]
)
=> <b class="bb" id="bbb">Bold</b>Anchor