class Loofah::Scrubbers::Escape

scrub!(:escape)

:escape performs HTML entity escaping on the unknown/unsafe tags:

unsafe_html = "ohai! <div>div is safe</div> <foo>but foo is <b>not</b></foo>"
Loofah.html5_fragment(unsafe_html).scrub!(:escape)
=> "ohai! <div>div is safe</div> &lt;foo&gt;but foo is &lt;b&gt;not&lt;/b&gt;&lt;/foo&gt;"