From 1a0d994e3aa7f93efee1c42c5c5ed55adecb20c9 Mon Sep 17 00:00:00 2001 From: Nathan Weizenbaum Date: Sun, 3 Aug 2008 00:05:36 -0400 Subject: [PATCH] html2haml should pre-escape HTML entities. --- lib/haml/html.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/haml/html.rb b/lib/haml/html.rb index 7ac686f8..e7f063aa 100644 --- a/lib/haml/html.rb +++ b/lib/haml/html.rb @@ -29,7 +29,7 @@ module Haml end method = @@options[:xhtml] ? Hpricot.method(:XML) : method(:Hpricot) - @template = method.call(template) + @template = method.call(template.gsub('&', '&')) end end