It's not clear what it is you're looking for. If this is a display
issue, you should probably just pass the data through nl2br() in the
view. Browsers ignore regular newlines / carriage returns.
On Sat, Mar 22, 2008 at 9:21 AM, Neveldo <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
> I have some troubles with carriage returns and data sanitization when
> I save data in my database.
>
> So, how can I allow carriage returns for users ?
>
> When I do that : $cleaner->clean($this->data, array('encode' =>
> false));
>
> It send me : "text\n\ntext" instead of carriage returns.
>
> And when I do that : $cleaner->clean($this->data, array('encode' =>
> false, 'carriage' => false));
>
> It send me : "text\n\r\n\rtext" instead of carriage returns.
>
> Have I to make a preg_replace in order to remplace myself \n by a
> carriage return when displaying ? Or there is a solution which allow
> carriage returns so we can use directely the nl2br function ?
>
> Thank a lot !
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---