From f46aef698ebb234578e04dc6c9ed2572b8dec3b1 Mon Sep 17 00:00:00 2001
From: "Edward Z. Yang" HTMLPurifier_ConfigSchema_Builder_ConfigSchema
generates a runtime HTMLPurifier_ConfigSchema
object,
which HTMLPurifier_Config
uses to validate its incoming
- data. There is also a planned documentation builder.
+ data. There is also an XML serializer, which is used to build documentation.
And the corresponding usage:
<?php - // assuming $purifier is an instance of HTMLPurifier - require_once 'HTMLPurifier/Filter/YouTube.php'; - $purifier->addFilter(new HTMLPurifier_Filter_YouTube()); + $config->set('Filter', 'YouTube', true); ?>
There is a bit going in the two code snippets, so let's explain.
diff --git a/library/HTMLPurifier.includes.php b/library/HTMLPurifier.includes.php index 0679711f..bf4ac9fb 100644 --- a/library/HTMLPurifier.includes.php +++ b/library/HTMLPurifier.includes.php @@ -7,7 +7,7 @@ * primary concern and you are using an opcode cache. PLEASE DO NOT EDIT THIS * FILE, changes will be overwritten the next time the script is run. * - * @version 3.0.0 + * @version 3.1.0rc1 * * @warning * You must *not* include any other HTML Purifier files before this file, diff --git a/library/HTMLPurifier/ConfigSchema/InterchangeBuilder.php b/library/HTMLPurifier/ConfigSchema/InterchangeBuilder.php index 1f09d291..3bc1d409 100644 --- a/library/HTMLPurifier/ConfigSchema/InterchangeBuilder.php +++ b/library/HTMLPurifier/ConfigSchema/InterchangeBuilder.php @@ -17,21 +17,27 @@ class HTMLPurifier_ConfigSchema_InterchangeBuilder $builder = new HTMLPurifier_ConfigSchema_InterchangeBuilder(); $interchange = new HTMLPurifier_ConfigSchema_Interchange(); - if (!$dir) $dir = realpath(dirname(__FILE__) . '/schema/'); + if (!$dir) $dir = dirname(__FILE__) . '/schema/'; $info = parse_ini_file($dir . 'info.ini'); $interchange->name = $info['name']; + $files = array(); $dh = opendir($dir); while (false !== ($file = readdir($dh))) { if (!$file || $file[0] == '.' || strrchr($file, '.') !== '.txt') { continue; } + $files[] = $file; + } + closedir($dh); + + sort($files); + foreach ($files as $file) { $builder->build( $interchange, new HTMLPurifier_StringHash( $parser->parseFile($dir . $file) ) ); } - closedir($dh); return $interchange; } diff --git a/release1-update.php b/release1-update.php index 5e6d354d..c611b324 100644 --- a/release1-update.php +++ b/release1-update.php @@ -90,5 +90,7 @@ if (!$c) { } file_put_contents('library/HTMLPurifier/Config.php', $config_c); +passthru('php maintenance/flush.php'); + echo "Review changes, write something in WHATSNEW, and then SVN commit with log 'Release $version.'" . PHP_EOL;