mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-07-31 19:30:21 +02:00
[3.1.0] Deprecate addFilter; set up Filter namespace
- Added EXTERNAL dependency config-schema value - Fix safe bug in Printer_HTMLDefinition - Fixed broken smoketests git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1669 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
@@ -20,8 +20,9 @@ accordingly.
|
||||
require_once $csstidy_location . 'class.csstidy.php';
|
||||
require_once $csstidy_location . 'class.csstidy_print.php';
|
||||
|
||||
$purifier = new HTMLPurifier();
|
||||
$purifier->addFilter(new HTMLPurifier_Filter_ExtractStyleBlocks());
|
||||
$purifier = new HTMLPurifier(array(
|
||||
'Filter.ExtractStyleBlocks' => true,
|
||||
));
|
||||
|
||||
$html = isset($_POST['html']) ? $_POST['html'] : '';
|
||||
$purified_html = $purifier->purify($html);
|
||||
|
Reference in New Issue
Block a user