Most direct way to strip unoprintable characters out of a string?

Steve Bergman steve at rueb.com
Sun Sep 25 13:35:42 EDT 2005


Fredrik Lundh wrote:

>("sanitizing" HTML data by running filters over encoded 8-bit data is hardly
>ever the right thing to do...)
>
>
>  
>
I'm very much open to suggestions as to the right way to do this.  I'm 
working on this primarily as a learning project and security is my 
motivation for wanting to strip  the unprintables.

Is there a better way? (This is a mod_python app , just for reference.)

Thanks,
Steve



More information about the Python-list mailing list