<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,3 +1,10 @@
+2009-03-30 Mina Naguib &lt;mina.hpricotscrub@naguib.ca&gt;
+	Release 0.3.5
+	- Fixes for recent versions of hpricot:
+	- Fix fatal error scrubbing anything that has no children (such as an
+	EmptyElem)
+	- Fix fatal error removing elements with no children
+
 2008-11-02 Michael &lt;michael@underpantsgnome.com&gt;
 	Release 0.3.4
 	- Fix gem command test - Thanks David Masover</diff>
      <filename>CHANGELOG.txt</filename>
    </modified>
    <modified>
      <diff>@@ -167,7 +167,11 @@ module Hpricot
     end
 
     def strip
-      swap(inner_html)
+      if (i = inner_html) != &quot;&quot;
+        swap(i)
+      else
+        remove
+      end
     end
 
     #
@@ -189,7 +193,7 @@ module Hpricot
 
       config = Scrub::normalize_config(config)
 
-      children.reverse.each do |child|
+      (children || []).reverse.each do |child|
         child.scrub(config) if child.scrubbable?
       end
 </diff>
      <filename>lib/hpricot_scrub/hpricot_scrub.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,7 +2,7 @@ module HpricotScrub #:nodoc:
   module VERSION #:nodoc:
     MAJOR = 0
     MINOR = 3
-    TINY  = 4
+    TINY  = 5
 
     STRING = [MAJOR, MINOR, TINY].join('.')
   end</diff>
      <filename>lib/hpricot_scrub/version.rb</filename>
    </modified>
    <modified>
      <diff>@@ -93,6 +93,11 @@ class HpricotScrubTest &lt; Test::Unit::TestCase
      end
   end
 
+  def test_elem_emptyelem
+    h = Hpricot(&quot;&lt;br&gt;&quot;)
+    assert_equal &quot;&quot;, h.scrub.to_s
+  end
+
   def test_attr_default_rule_removes
      @scrubbed_docs.each do |doc|
        assert_equal 0, doc.search(&quot;*[@mce_src]&quot;).length</diff>
      <filename>test/hpricot_scrub_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>31a3c14f1f89551d7461b67dacbc745eb5e7b403</id>
    </parent>
  </parents>
  <author>
    <name>Mina Naguib</name>
    <email>mina@mina.lan</email>
  </author>
  <url>http://github.com/UnderpantsGnome/hpricot_scrub/commit/b4beba2c6db48112aaad013d529a747aa597c3b1</url>
  <id>b4beba2c6db48112aaad013d529a747aa597c3b1</id>
  <committed-date>2009-03-30T20:21:16-07:00</committed-date>
  <authored-date>2009-03-30T20:21:16-07:00</authored-date>
  <message>Release 0.3.5
- Fixes for recent versions of hpricot:
- Fix fatal error scrubbing anything that has no children (such as an EmptyElem)
- Fix fatal error removing elements with no children</message>
  <tree>9e6be6423e12a5d07b253a7a82c8fc400f7409a2</tree>
  <committer>
    <name>Mina Naguib</name>
    <email>mina@mina.lan</email>
  </committer>
</commit>
