# File lib/haml/html.rb, line 51 def erb_to_interpolation(text, options) return text unless options[:erb] text = CGI.escapeHTML(uninterp(text)) %w[<haml:loud> </haml:loud>].each {|str| text.gsub!(CGI.escapeHTML(str), str)} ::Hpricot::XML(text).children.inject("") do |str, elem| if elem.is_a?(::Hpricot::Text) str + CGI.unescapeHTML(elem.to_s) else # <haml:loud> element str + '#{' + CGI.unescapeHTML(elem.innerText.strip) + '}' end end end