in reply to Re: Re: Newlines in textarea w/ CGI.pm
in thread Newlines in textarea w/ CGI.pm
Err... I'm wondering about your assumptions now--when I view the source of the response page, I get the newlines back just as I submitted them. You are aware that HTML formats text with all whitespace treated equally, aren't you? That is, all runs of whitespace of any kind (\s+) are condensed to a single space (just as you describe, in fact). If you want to preserve the newlines, use <PRE>preformatted text</PRE> (in CGI.pm, that's pre($text)).
If you are in fact aware of this, I apologize, but in that case I think you're looking at a browser issue--I'm getting back exactly the results I'd expect from your code, using IE5/Mac.
|
|---|