html2haml -r should unescape HTML after parsing. Thanks to Michael O'Malley. Also a tiny bit of reformatting in engine.rb.

git-svn-id: svn://hamptoncatlin.com/haml/trunk@564 7063305b-7217-0410-af8c-cdc13e5119b9
This commit is contained in:
nex3 2007-07-16 05:01:45 +00:00
parent cc238a740c
commit 47d757c7d4
2 changed files with 4 additions and 2 deletions

View File

@ -783,7 +783,8 @@ END
# This means that we can render the tag directly to text and not process it in the buffer
open_tag = prerender_tag(tag_name, atomic, attributes)
if tag_closed = do_one_liner && !parse
tag_closed = do_one_liner && !parse
if tag_closed
open_tag += value
open_tag += "</#{tag_name}>"
end

View File

@ -129,7 +129,8 @@ module Haml
def to_haml(tabs = 0)
output = "#{tabulate(tabs)}"
if HTML.options[:rhtml] && name[0...5] == 'haml:'
return output + HTML.send("haml_tag_#{name[5..-1]}", self.innerHTML)
return output + HTML.send("haml_tag_#{name[5..-1]}",
CGI.unescapeHTML(self.innerHTML))
end
output += "%#{name}" unless name == 'div' && (attributes.include?('id') || attributes.include?('class'))