Filter out HTML tags and resolve entities in python
<p>Because regular expressions scare me, I'm trying to find a way to remove all HTML tags and resolve HTML entities from a string in Python.</p>

<p>Use <a href="http://codespeak.net/lxml/lxmlhtml.html">lxml</a> which is the best xml/html library for python.</p>

<pre><code>import lxml.html
t = lxml.html.fromstring("...")
t.text_content()
</code></pre>

<p>And if you just want to sanitize the html look at the lxml.html.clean <a href="http://codespeak.net/lxml/lxmlhtml.html#cleaning-up-html">module</a></p>
