how to generate brief of a html article?
<pre><code>a= &lt;div&gt;&lt;xxxx.......&lt;a&gt;....&lt;/a&gt;&lt;/div&gt;
</code></pre>

<p>I want to make a blog app by web2py,i want to generate a brief of the content,maybe first 50 words of the content. but if i use a[:50] the html tag will be error. is there some easy functions to do this?</p>
