Initial commit

This commit is contained in:
2022-11-21 09:47:28 +01:00
commit 76cec83d26
11652 changed files with 1980467 additions and 0 deletions

21
func_htmlclean.php Normal file
View File

@ -0,0 +1,21 @@
<?PHP
ignore_user_abort(true); // DAMIT DAS SCRIPT AUF KEINEN TIMEOUT LÄUFT
@set_time_limit(0);
function htmlclean($html, $db) {
$html= preg_replace('/<(\/)?(font|span|del|ins|style)[^>]*>/','',$html);
$html= preg_replace('/<([^>]*)(class|lang|size|face)=("[^\"]*"|\'[^\']*\'|[^>]+)([^>]*)>/','',$html);
$html= preg_replace('/<([^>]*)(class|lang|size|face)=("[^\"]*"|\'[^\']*\'|[^>]+)([^>]*)>/','',$html);
$html= preg_replace('/<meta(.|\s)*?>/', '', $html);
$html= preg_replace('/<\/meta(.|\s)*?>/', '', $html);
$html= preg_replace('/<link(.|\s)*?>/', '', $html);
$html= preg_replace('/<!--.+?-->/s', '', $html);
$html= preg_replace('/\s{2,}/sm',' ',$html,PREG_SET_ORDER); //Mehr als zwei leerzeichen entfernen
$html= preg_replace('/\s{2,}/sm',' ',$html,PREG_SET_ORDER); //Mehr als zwei leerzeichen entfernen
$html= str_replace (array("\r\n"), array(""), $html);
$html= trim($html);
$html= $db->real_escape_string(stripslashes($html));
return $html;
}
?>