Re: quickform setdefaults() problem
| From: | Justin Patrin | Date: | Wed, 12 Oct 2005 20:15:41 +0000 |
| Subject: | Re: quickform setdefaults() problem | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-21412@lists.php.net to get a copy of this message | ||
On 10/12/05, Jaskirat Singh <jaskirat_singh@yahoo.com> wrote:
> Hi,
> In a form that I have created using quickform, I am using one textearea
> field.
> In the textarea box, newline characters are getting changed to \r\n
> when the form is submitted.
>
> This line is causing that side effect some how
> $qf->setdefaults($defaults_array);
>
> it works fine (ie. no \r\n) if I comment it out.
>
Does the field in $defaults_array have \r\n? Have you checked to make
sure the $_POST var doesn't have \r\n? Windows uses \r\n for newlines
by default, so if you're using a Windows browser you are probably
getting this from there.
--
Justin Patrin