title: How to convert special characters into html entities?
body: <p>I want to convert, in python, special characters like <code>"%$!&amp;@á é ©"</code> and not only <code>'&lt;&amp;"&gt;'</code> as all the documentation and references I've found so far shows. cgi.escape doesn't solve the problem.</p>
  
  <p>For example, the string <code>"á ê ĩ &amp;"</code> should be converted to <code>"&amp;aacute; &amp;ecirc; &amp;itilde; &amp;amp;"</code>.</p>
  
  <p>Does anyboy know how to solve it?
  I'm using python 2.6.</p>