[Zope] way to cleanup form input text?

Chris Beaumont cbeaumon@msri.org
Thu, 11 Jan 2001 15:43:20 -0800


Is there a simple way to clean up text that's input to HTML forms in Zope?
I have a situation where one of my users is copying text from her web 
browser and pasting it into Zope.

I'm sure this is a common problem..

The input text ends up having runs of whitespace characters in it 
that I'd like to prune down to one each..and I think it's also been 
the source of some non-standard, unwanted characters that cause 
problems if they end up getting into our database..

I'm sure someone else has encountered this problem before..what's the 
best way to fix it? The string module doesn't seem to have what I 
want.. (or at least I couldn't find it..)  The worst problems seems 
to be long strings of spaces or tabs that I'd like to turn into 
single spaces..(each)




Thanks!

Chris

cbeaumon@msri.org