<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -17,6 +17,11 @@ XHTMLPurifierTestCase = function() {
       html += &quot;&lt;/table&gt;&quot;;
       assert.areEqual(html, XHTMLPurifier.purify(html).replace(/\s+/g, ''));
     },
+
+    testEmptyTableWithPAfter: function () {
+      var html = &quot;&lt;table&gt;&lt;/table&gt; &lt;p&gt;Hola&lt;/p&gt;&quot;;
+      assert.areEqual(&quot;\n\n&lt;p&gt;\n  Hola\n&lt;/p&gt;&quot;, XHTMLPurifier.purify(html));
+    },
     
     testBadTables: function() {
       var html = &quot;&lt;table&gt;&quot;;</diff>
      <filename>test/xhtml_purifier_test.js</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,5 @@
 &lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot;
 	&quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quot;&gt;
-
 &lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; xml:lang=&quot;en&quot; lang=&quot;en&quot;&gt;
 &lt;head&gt;
 	&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot;/&gt;</diff>
      <filename>xhtml_purifier.html</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,6 @@
 /*
  * XHTML Purifier By Mathias Biilmann Christensen
+ * and Rodrigo Alvarez
  * Copyright Domestika 2008
  *
  */
@@ -248,10 +249,10 @@ XHTMLPurifier = function() {
   }
   
   function reset_insertion_mode() {
-    var context_node;
     var last = false;
     for (var i = stack.length - 1; i &gt;= 0; i--){
-      if (stack[i] == stack[0]) {
+      var node = stack[i];
+      if (node == stack[0]) {
         last = true;
       }
       switch(node.tagName.toLowerCase()) {
@@ -1066,4 +1067,4 @@ XHTMLPurifier = function() {
 			obj[ items[i] ] = true;
 		return obj;
 	}
-})();
\ No newline at end of file
+})();</diff>
      <filename>xhtml_purifier.js</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>c783e24286aac5384db63c30af1e1839c7f51ac5</id>
    </parent>
  </parents>
  <author>
    <name>Mathias Biilmann Christensen</name>
    <email>mathias.biilmann@domestika.com</email>
  </author>
  <url>http://github.com/biilmann/javascript-xhtml-purifier/commit/82074e639eab8f3f51fb5dec5ed0416709cbfe5b</url>
  <id>82074e639eab8f3f51fb5dec5ed0416709cbfe5b</id>
  <committed-date>2009-03-26T08:29:57-07:00</committed-date>
  <authored-date>2009-03-26T08:29:57-07:00</authored-date>
  <message>Fixed bug that caused elements after a table to disappear due to a missing assignment in the reset_insertion_mode function.</message>
  <tree>b56751635f80db1be20e2b70613e09d621fcc9aa</tree>
  <committer>
    <name>Mathias Biilmann Christensen</name>
    <email>mathias.biilmann@domestika.com</email>
  </committer>
</commit>
