[Zope] textarea/newline-mess

Thomas B. Passin tpassin@mitretek.org
Thu, 27 Jun 2002 15:26:39 -0400

Page Page]
> For editing the TEXT I use a .dtml-script that re-assembles
> the text line by line:
>     <textarea><dtml-in sqlFetchTEXT><dtml-var LINE></textarea>

I hope this is not exactly your code, because the dtml-in element doesn't
end within the textarea.  Assuming that it really is closed properly, you
may have an unnoticed line feed, like this:

<textarea><dtml-in sqlFetchTEXT><dtml-var LINE>

If so, that line feed may be showing up.   If the dtml-in element is not
closed within the textarea, I'd say the results are unpredictable.  Have you
look at the actual HTML output that you get to make sure it is what you

> Please note, that I write it all without any spacing between
> the tags. One could think that this results in having the
> lines being displayed in the textarea like this:
>     Line00Line01Line02Line03
> but thats not the case. For some reason we see
>     Line00
>     Line01
>     Line02
>     Line03
> How's that possible? string.split() removed all the newlines.

If you don't have a stealth linefeed like the above, I don't really know.


Tom P