module Haml::Precompiler
def unescape_interpolation(str, opts = {})
def unescape_interpolation(str, opts = {}) res = '' rest = Haml::Shared.handle_interpolation str.dump do |scan| escapes = (scan[2].size - 1) / 2 res << scan.matched[0...-3 - escapes] if escapes % 2 == 1 res << '#{' else content = eval('"' + balance(scan, ?{, ?}, 1)[0][0...-1] + '"') content = "Haml::Helpers.html_escape(#{content})" if opts[:escape_html] res << '#{' + content + "}"# Use eval to get rid of string escapes end end res + rest end