[mod_python] Feature Request: Additions to mod_python.util

Mike Looijmans nlv11281 at natlab.research.philips.com
Wed Jan 4 07:38:14 EST 2006


> 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