hじゃないサニタイズ
<%=h @hoge %>
だと、けっこう問答無用でエスケープされる。
でも、ある程度のHTMLは入力許したいとき、タグと属性をホワイトリストで指定できた。
<%= sanitize %(<table><tr><td><font id="hoge" style="color:red;">ほげ</font></td></tr></table>), :tags => %w(font), :attributes => %w(class style) %>
で表示されるのは
<font style="color:red;">ほげ</font>
だけ。
hとは、用途が似て非なるもの
ですよね(;・∀・)ダダイジョウブ・・・?