Hallo,
was haltet Ihr von folgendem Ansatz ?
$stripAttrib = "onclick|...|onkeyup";
function boesartige_tags_entfernen($source)
{
global $allowedTags;
$source = strip_tags($source, $allowedTags);
return preg_replace('/<(.*?)>/ie', "'<'.boesartige_attribute_entfernen('\1').'>'", $source);
}
function boesartige_attribute_entfernen($tagSource)
{
global $stripAttrib;
return stripslashes(preg_replace("/$stripAttrib/i", 'forbidden', $tagSource));
}
Thomas