1module Sinatra 2 module HTMLEscapeHelper 3 def h(text) 4 Rack::Utils.escape_html(text).to_s.gsub("/", "/") 5 end 6 end 7 8 class Base 9 helpers Sinatra::HTMLEscapeHelper 10 end 11end