title: remove table tags but not p tags with BeautifulSoup
body: <p>I have problem with delete table in text in django object. Sometimes I have <code>&lt;p&gt;</code> tags inside <code>&lt;table&gt;</code>. How to avoid delete p tags but delete table tags. For now I am deleting table and it is ok when p tag is outside of table. To do all this things I am using BeautifulSoup.</p>
  <pre><code>for obj in article:
      soup_en = BeautifulSoup(obj.text_en, features=&quot;html5lib&quot;)
      if soup_en.find_all('table'):
          for i in soup_en.select('table'):
              i.decompose()
      obj.text_en = str(soup_en).replace(r'\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n','').replace(r'\r\n', '\n').replace('#####444#####', '').replace('#####555#####', '')
      obj.save()
  </code></pre>
  <p>html code</p>
  <pre><code>&lt;TABLE border=0 cellSpacing=0 cellPadding=0 width=&quot;100%&quot;&gt;\r\n
      &lt;TBODY&gt;\r\n
          &lt;TR&gt;\r\n
              &lt;TD style=&quot;BORDER-BOTTOM-COLOR: ; BORDER-TOP-COLOR: ; BORDER-RIGHT-COLOR: ; BORDER-LEFT-COLOR: &quot;&gt;&lt;IMG src=&quot;http://www.example.com/nix.gif&quot; width=416 height=16&gt;&lt;/TD&gt;&lt;/TR&gt;\r\n&lt;TR&gt;\r\n&lt;TD style=&quot;BORDER-BOTTOM-COLOR: ; BORDER-TOP-COLOR: ; BORDER-RIGHT-COLOR: ; BORDER-LEFT-COLOR: &quot; bgColor=#cccccc&gt;&lt;IMG src=&quot;http://www.example.com/nix.gif&quot; width=416 height=1&gt;&lt;/TD&gt;&lt;/TR&gt;\r\n&lt;TR&gt;\r\n&lt;TD style=&quot;BORDER-BOTTOM-COLOR: ; BORDER-TOP-COLOR: ; BORDER-RIGHT-COLOR: ; BORDER-LEFT-COLOR: &quot;&gt;
                  &lt;P class=flowtextblack&gt;&lt;STRONG&gt;Information:&lt;/STRONG&gt;Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum &lt;/P&gt;
              &lt;/TD&gt;
          &lt;/TR&gt;
      &lt;/TBODY&gt;
  &lt;/TABLE&gt;
  </code></pre>