Saturday, October 31, 2009

Sanitize:: clean help

Can someone help me out with this fairly simple question.
 
I am doing:
 
$clean = new Sanitize();
$this->data = $clean->clean($this->data);
 
Now if a user enters quotes brackets or what not it gets converted to <script> which is fine for saving to the db I suppose. But when they go back to edit the entry the input is <script> how can i convert it back to what it was before? So it is readable.
I want the data to be safe for the db but also be able to be editable by the end user.
 
I tried echo $form->input(html_entity_decode('description'));but still comes out all mangled
 
Thanks
 
Dave

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: