';
?>
HTML Purifier Preserve YouTube Smoketest
HTML Purifier Preserve YouTube Smoketest
]+>.+?'.
'http://www.youtube.com/v/([A-Za-z0-9]+).+?#';
$pre_replace = '\1';
$html = preg_replace($pre_regex, $pre_replace, $html);
$html = parent::purify($html, $config);
$post_regex = '#([A-Za-z0-9]+)#';
$post_replace = '';
$html = preg_replace($post_regex, $post_replace, $html);
return $html;
}
}
$string = '';
$regular_purifier = new HTMLPurifier();
$youtube_purifier = new HTMLPurifierX_PreserveYouTube();
?>
Unpurified
Click here to see the unpurified version (breaks validation).
Without YouTube exception
purify($string);
?>
With YouTube exception
purify($string);
?>