views:

142

answers:

1

I have a small Sinatra app which generates html fragments for me from an ERB template.

How do I html_escape the output?

The <%=h somestring %> helper does not exist in Sinatra.

+2  A: 

Rack::Utils includes a HTML escape method. http://www.sinatrarb.com/faq.html#escape_html

fatnic