On Mar 24, 12:52 pm, Neveldo <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I've a little problem with the function sanitize::escape.
>
> I've data from a post form and I want to save it in my database.
>
> I secure my data like that:
>
> uses('sanitize');
> $cleaner = new Sanitize();
> $cleanedData['Post']['body'] = $cleaner->escape($this->data['Post']
> ['body']);
>
> My problem is that my data seems to be addslashed two times.
>
> So, in my database, it looks like that :
>
> \"hello\" word, \n\n I\'ve a little problem
>
> Instead of :
>
> "hello" word,
>
> I've a little problem
>
> Could you help me ?

Just delete this line (cake does that for you):
$cleanedData['Post']['body'] = $cleaner->escape($this->data['Post']
['body']);

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to