<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -10,6 +10,8 @@
   This makes Haml templates not crash when given non-ASCII input
   that's marked as having an ASCII encoding.
 
+* Fixed an incompatibility with Hpricot 0.8.2, which is used for `html2haml`.
+
 ## [2.2.12](http://github.com/nex3/haml/commit/2.2.12)
 
 There were no changes made to Sass between versions 2.2.11 and 2.2.12.</diff>
      <filename>doc-src/HAML_CHANGELOG.md</filename>
    </modified>
    <modified>
      <diff>@@ -23,6 +23,10 @@ module Haml
         '  ' * tabs
       end
 
+      def attr_hash
+        attributes.to_hash
+      end
+
       def parse_text(text, tabs)
         text.strip!
         text.gsub!('#{', '\#{') #'
@@ -177,16 +181,16 @@ module Haml
         output += &quot;%#{name}&quot; unless name == 'div' &amp;&amp;
           (static_id?(options) || static_classname?(options))
 
-        if attributes
+        if attr_hash
           if static_id?(options)
-            output += &quot;##{attributes['id']}&quot;
+            output += &quot;##{attr_hash['id']}&quot;
             remove_attribute('id')
           end
           if static_classname?(options)
-            attributes['class'].split(' ').each { |c| output += &quot;.#{c}&quot; }
+            attr_hash['class'].split(' ').each { |c| output += &quot;.#{c}&quot; }
             remove_attribute('class')
           end
-          output += haml_attributes(options) if attributes.length &gt; 0
+          output += haml_attributes(options) if attr_hash.length &gt; 0
         end
 
         (self.children || []).inject(output + &quot;\n&quot;) do |output, child|
@@ -198,7 +202,7 @@ module Haml
       
       def dynamic_attributes
         @dynamic_attributes ||= begin
-          Haml::Util.map_hash(attributes) do |name, value|
+          Haml::Util.map_hash(attr_hash) do |name, value|
             next if value.empty?
             full_match = nil
             ruby_value = value.gsub(%r{&lt;haml:loud&gt;\s*(.+?)\s*&lt;/haml:loud&gt;}) do
@@ -220,7 +224,7 @@ module Haml
       end
 
       def static_attribute?(name, options)
-        attributes[name] and !dynamic_attribute?(name, options)
+        attr_hash[name] and !dynamic_attribute?(name, options)
       end
       
       def dynamic_attribute?(name, options)
@@ -238,7 +242,7 @@ module Haml
       # Returns a string representation of an attributes hash
       # that's prettier than that produced by Hash#inspect
       def haml_attributes(options)
-        attrs = attributes.map do |name, value|
+        attrs = attr_hash.map do |name, value|
           value = dynamic_attribute?(name, options) ? dynamic_attributes[name] : value.inspect
           name = name.index(/\W/) ? name.inspect : &quot;:#{name}&quot;
           &quot;#{name} =&gt; #{value}&quot;</diff>
      <filename>lib/haml/html.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>76bd406875920079bb26445ddeb0d3842e825f01</id>
    </parent>
  </parents>
  <author>
    <name>Nathan Weizenbaum</name>
    <email>nex342@gmail.com</email>
  </author>
  <url>http://github.com/nex3/haml/commit/0c44bbc7554bb7212cfc650c9bc48bfb794ba55f</url>
  <id>0c44bbc7554bb7212cfc650c9bc48bfb794ba55f</id>
  <committed-date>2009-11-08T16:40:37-08:00</committed-date>
  <authored-date>2009-11-08T16:40:37-08:00</authored-date>
  <message>[Haml] [html2haml] Fix an incompatibility with Hpricot 0.8.2.</message>
  <tree>97f16bc821f17ee0f908444fbd650306041b660b</tree>
  <committer>
    <name>Nathan Weizenbaum</name>
    <email>nex342@gmail.com</email>
  </committer>
</commit>
