I am currently using this script to disinfect a block of text ...
function rseo_sanitize($s) {
$result = preg_replace("/[^a-zA-Z0-9'-]+/", "", html_entity_decode($s, ENT_QUOTES));
return $result;
}
I would like to add support for a collection of special characters such as ñ, á, é, í, ó, ú, etc.
How can I integrate those (and a large collection of Spanish characters) into preg_replace?
source
share