mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-08-20 04:41:32 +02:00
[2.1.3]
- Work around unnecessary DOMElement type-cast in PH5P that caused errors in PHP 5.1 - Work around PHP 4 SimpleTest lack-of-error complaining for one-time-only HTMLDefinition errors, this may indicate problems with error-collecting facilities in PHP 5 - Make ErrorCollectorEMock work in both PHP 4 and PHP 5 . tests/multitest.php allows you to test multiple versions by running tests/index.php through multiple interpreters using `phpv` shell script (you must provide this script!) . Minor cosmetic change to flush-definition-cache.php: trailing newline is outputted . Maintenance script for generating PH5P patch added, original PH5P source file also added under version control . Full unit test runner script title made more descriptive with PHP version git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1440 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
13
maintenance/generate-ph5p-patch.php
Normal file
13
maintenance/generate-ph5p-patch.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
$orig = realpath(dirname(__FILE__) . '/PH5P.php');
|
||||
$new = realpath(dirname(__FILE__) . '/../library/HTMLPurifier/Lexer/PH5P.php');
|
||||
$newt = dirname(__FILE__) . '/PH5P.new.php'; // temporary file
|
||||
|
||||
// minor text-processing of new file to get into same format as original
|
||||
$new_src = file_get_contents($new);
|
||||
$new_src = '<?php' . PHP_EOL . substr($new_src, strpos($new_src, 'class HTML5 {'));
|
||||
|
||||
file_put_contents($newt, $new_src);
|
||||
shell_exec("diff -u \"$orig\" \"$newt\" > PH5P.patch");
|
||||
unlink($newt);
|
Reference in New Issue
Block a user