[mod_python] Feature Request: Additions to mod_python.util

Sean Jamieson sean at barriescene.com
Wed Jan 4 12:44:31 EST 2006

"or by using &...; markups."
this is exactly the point, the method(s) would translate all of these 
entities, which are defined in the (X)HTML specification

"What would you use it for"
the need has come up many times in my 6 years of web development, for 
varrious reasons.

Mike Looijmans wrote:

>> 2. html(encode|decode) for translating all defined entity characters; 
>> currently pythons default cgi.escape only translates "&", "<" and 
>> ">", and xml.sax.saxutils.escape is both silly if you're not using 
>> sax for anything else, and not convenient as you have to give it the 
>> translation table.
> I probably understand your question wrong, but...
> &<> are the only characters that need escaping, so cgi.escape should 
> be sufficient. International characters can be output using the right 
> codepage in your header, or by using &...; markups.
> > Also a simple method to unescape these is quite useful aswell.
> What would you use it for (I never had any need for it in >5 years of 
> server programming in many, many languages)?

More information about the Mod_python mailing list