Hi,
I'd like to use the sanitize->paranoid method to clean up all input
from my app forms...
I have created a whitelist array containing allow arrays for each of my
inputs - if an input has no matching key in my array then it will
sanitize with nothing allowed - so keeping things nice and tight - only
allowing stuff I've set to get through:
var $whitelist = array(
'name' => array(' '),
'short_description' => array(' ', ',', '.', '-'),
'long_description' => array(
'
<strong>',
'
</strong>',
'.', '
', '_', ','
),
'map_coords' => array(',', '.'),
'enquiry_email' => array('.','_','-','@'),
);
This works well except for an html input box I have - i'd like to enter
allowed html tags, but can't figure out how to do it (probably need
some reg exp help here) - here's what I'd like to pass through into
sanitize->paranoid:
$cleanhtmlinput = $san->paranoid($myhtmlinput, array('<strong>',
'</strong>', '.', ' ', '_', ','));
So only allowing the strong tag to get through...
What do I have to wrap around my <strong> string in order that the
regexp regognises it as a whole string..?
Cheers for any help.
Guy
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---