can there be any python module or code that implements the org.apache.commons.lang.StringEscapeUtils.escapeHtml ?

the identical as with http://commons.apache.org/lang/api/org/apache/commons/lang/StringEscapeUtils.html#escapeHtml(java.lang.String)

i researched around but tend to only discover the cgi.escape function that does not perform the same factor.

thanks ahead of time, sorry for that british :D

To XML and never for HTML, however it might meet your needs: Escaping XML

>>> from xml.sax.saxutils import escape
>>>
>>> escape("< & >")
'&lt; &amp; &gt;'

i have found something which operate in peterbe.com/plog/html-entity-fixer just help