diff options
author | Klaus <Klaus.Weidenbach@gmx.net> | 2017-03-27 21:39:02 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-27 21:39:02 +0200 |
commit | 6375401e0af6c52d151dd2b944aa6a054b8ddc05 (patch) | |
tree | 982ab84421ffa8ee2c48f38cc2d1eef11853dbf6 /vendor/ezyang/htmlpurifier/maintenance/generate-ph5p-patch.php | |
parent | b6b62506c5f4ed5bc354d548702538bda36aff36 (diff) | |
parent | f718e2b0db0fe3477212a8dd6c3ec067f4432862 (diff) | |
download | volse-hubzilla-6375401e0af6c52d151dd2b944aa6a054b8ddc05.tar.gz volse-hubzilla-6375401e0af6c52d151dd2b944aa6a054b8ddc05.tar.bz2 volse-hubzilla-6375401e0af6c52d151dd2b944aa6a054b8ddc05.zip |
Merge pull request #701 from dawnbreak/HTMLpurifier
HTMLPurifier library update
Diffstat (limited to 'vendor/ezyang/htmlpurifier/maintenance/generate-ph5p-patch.php')
-rw-r--r-- | vendor/ezyang/htmlpurifier/maintenance/generate-ph5p-patch.php | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/vendor/ezyang/htmlpurifier/maintenance/generate-ph5p-patch.php b/vendor/ezyang/htmlpurifier/maintenance/generate-ph5p-patch.php new file mode 100644 index 000000000..c92a7d211 --- /dev/null +++ b/vendor/ezyang/htmlpurifier/maintenance/generate-ph5p-patch.php @@ -0,0 +1,22 @@ +<?php + +/** + * @file + * This file compares our version of PH5P with Jero's original version, and + * generates a patch of the differences. This script should be run whenever + * library/HTMLPurifier/Lexer/PH5P.php is modified. + */ + +$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); + +// vim: et sw=4 sts=4 |