1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-07-31 19:30:21 +02:00

[2.1.4] Add information about PHP 5.0.5 or earlier.

- Fix segfault in 5.0.x with IDAccumulator test.

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/branches/php4@1726 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang
2008-05-16 01:25:22 +00:00
parent f26eb7551a
commit ec6b6821cf
4 changed files with 13 additions and 18 deletions

View File

@@ -14,10 +14,11 @@ basic sanity checks to get the most out of this library.
---------------------------------------------------------------------------
1. Compatibility
HTML Purifier works in both PHP 4 and PHP 5, and is actively tested from
PHP 4.3.7 and up (see tests/multitest.php for specific versions). It has
no core dependencies with other libraries. PHP 4 support will be
deprecated on December 31, 2007, at which time only essential security
THIS IS A DEPRECATED PHP4 VERSION OF HTML PURIFIER.
If you are running PHP5, please go to http://htmlpurifier.org to download
the latest version. This version of HTML Purifier is only actively tested
from PHP 4.3.7 to PHP 5.0.5. Essential security will be released for this branch
fixes will be issued for the PHP 4 version until August 8, 2008.
These optional extensions can enhance the capabilities of HTML Purifier:

View File

@@ -28,9 +28,9 @@ class HTMLPurifier_IDAccumulator
* @static
*/
function build($config, &$context) {
$id_accumulator = new HTMLPurifier_IDAccumulator();
$id_accumulator->load($config->get('Attr', 'IDBlacklist'));
return $id_accumulator;
$acc = new HTMLPurifier_IDAccumulator();
$acc->load($config->get('Attr', 'IDBlacklist'));
return $acc;
}
/**

View File

@@ -32,7 +32,10 @@ class HTMLPurifier_IDAccumulatorTest extends HTMLPurifier_Harness
function testBuild() {
$this->config->set('Attr', 'IDBlacklist', array('foo'));
$accumulator = HTMLPurifier_IDAccumulator::build($this->config, $this->context);
// For some reason, doing the static call here results in a segfault
// for early versions of PHP 5.0.x
$acc = new HTMLPurifier_IDAccumulator();
$accumulator = $acc->build($this->config, $this->context);
$this->assertTrue( isset($accumulator->ids['foo']) );
}

View File

@@ -12,16 +12,7 @@ $versions_to_test = array(
'4.4.7',
'5.0.4',
'5.0.5',
'5.1.4',
'5.1.6',
'5.2.0',
'5.2.1',
'5.2.2',
'5.2.3',
'5.2.4',
'5.2.5RC2-dev',
'5.3.0-dev',
// '6.0.0-dev',
// We don't care about later versions: use HTML Purifier 3+!!!
);
echo str_repeat('-', 70) . "\n";