The clean method has some options, these are:
'odd_spaces' (Remove odd spaces when true)
'encode' (Remove html symbols using Sanitize::html when true)
'dollar' (Remove $ symbols when true)
'carriage' (Remove carriage \r when true)
'unicode' (Replace unicode with non-unicode when true)
'escape' (Escape using Sanitize::escape when true)
'backslash' (Replace \ when true)

Look at the source at http://api.cakephp.org/view_source/sanitize/#line-192

Enjoy,
   John


On Apr 22, 9:22 pm, "Dave Maharaj :: WidePixels.com"
<[email protected]> wrote:
> I have been reading the cookbook looking for info on cleaning data submitted
> by user.
>
> $badString = '<font size="99"
> color="#FF0000">HEY</font><script>...</script>';
> echo Sanitize::html($badString);
>
> Appears to me this is in the view.
>
> But how can I prevent it from being saved to the database?
>
> I have this in a controller my understanding is its cleaning the form
> submitted data?
> $this->params['form']['value'] =
> Sanitize::clean($this->params['form']['value'], array(' '));
>
> Thanks,
>
> Dave
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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