[Zope] whitespace normalization (was: [Zope] way to cleanup form input text?)
Dieter Maurer
dieter@handshake.de
Fri, 12 Jan 2001 23:26:47 +0100 (CET)
Chris Beaumont writes:
> ... whitespace normalization ...
An idiom for whitespace normalization is:
"_.string.join(_.string.split(text_to_be_normalized))"
It will replace any sequences of consecutive whitespace
characters by a single space.
You can not use it in all cases, as sometimes
newlines are semantically important.
The above idiom would convert them into space.
Dieter