我目前使用這個腳本消毒的文本塊...串消毒支持特殊字符,如N,A,E,I,O,U,等
function rseo_sanitize($s) {
$result = preg_replace("/[^a-zA-Z0-9'-]+/", "", html_entity_decode($s, ENT_QUOTES));
return $result;
}
我會喜歡增加對特殊字符集合的支持,如ñ,á,é,í,ó,ú等。
如何將這些(以及較大的西班牙字符集合)集成到preg_replace中?