class Haml::ForceEscape
Unlike Haml::Escape, this escapes value even if it’s html_safe.
def initialize(opts = {})
def initialize(opts = {}) super @escape_code = options[:escape_code] || "::Haml::Util.escape_html((%s))" @escaper = eval("proc {|v| #{@escape_code % 'v'} }") end
def on_escape(flag, exp)
ForceEscape doesn't touch :escape expression.
def on_escape(flag, exp) [:escape, flag, compile(exp)] end