[Zope] retrieving data from REQUEST.form

Bill Anderson bill@libc.org
Fri, 11 Aug 2000 15:21:35 -0600


Nick Garcia wrote:
> 
> jesse wrote:
> >
> > <dtml-var "REQUEST.form['list']">
> >
> > it comes out with
> >
> > line one line two line three
> >
> > All the line breaks dissapear! So there is nothing to replace! Does anyone have any ideas how I could solve this problem?
> 
> The line breaks don't disappear, they just don't mean anything in HTML.
> You can still replace them.  You can do <dtml-var
> "_.string.replace(REQUEST.form['list'], '\n', '<br>')"> and it should do
> what you want.

<dtml-var "REQUEST.form['list']" newline_to_br>

Is much simpler. :)
Just out of caution, I would not use 'list' as a variable, though.

Bill

--
Do not meddle in the affairs of sysadmins, for they are easy to annoy,
and have the root password.