cgi - cleaning tabs and returns out of textarea

Jason Orendorff jason at
Tue Jan 29 01:09:19 CET 2002

Glenn Stauffer wrote:
> Thanks for the other suggestions.  I'll have to play around with 
> it more and see what works best.

This works best:

def clean(text):
    return ' '.join(text.split())

Don't use re unless you have to.

## Jason Orendorff

More information about the Python-list mailing list