From ae1828d955112356f7677c465f94f7deb7d27a40 Mon Sep 17 00:00:00 2001 From: "Edward Z. Yang" Date: Tue, 4 Aug 2015 18:03:42 -0700 Subject: [PATCH] Release 4.7.0. Signed-off-by: Edward Z. Yang --- Doxyfile | 2 +- FOCUS | 13 --- NEWS | 2 +- TODO | 2 +- VERSION | 2 +- WHATSNEW | 9 +-- library/HTMLPurifier.includes.php | 2 +- library/HTMLPurifier.php | 6 +- library/HTMLPurifier/Config.php | 2 +- maintenance/add-vimline.php | 1 - maintenance/update-freshmeat.php | 161 -------------------------------------- 11 files changed, 13 insertions(+), 189 deletions(-) delete mode 100644 FOCUS delete mode 100644 maintenance/update-freshmeat.php diff --git a/Doxyfile b/Doxyfile index b6130b9b..b418f212 100644 --- a/Doxyfile +++ b/Doxyfile @@ -31,7 +31,7 @@ PROJECT_NAME = HTMLPurifier # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = 4.6.0 +PROJECT_NUMBER = 4.7.0 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. diff --git a/FOCUS b/FOCUS deleted file mode 100644 index e13b9aa0..00000000 --- a/FOCUS +++ /dev/null @@ -1,13 +0,0 @@ -9 - Major security fixes - -[ Appendix A: Release focus IDs ] -0 - N/A -1 - Initial freshmeat announcement -2 - Documentation -3 - Code cleanup -4 - Minor feature enhancements -5 - Major feature enhancements -6 - Minor bugfixes -7 - Major bugfixes -8 - Minor security fixes -9 - Major security fixes diff --git a/NEWS b/NEWS index 7b8e6172..a9124af1 100644 --- a/NEWS +++ b/NEWS @@ -9,7 +9,7 @@ NEWS ( CHANGELOG and HISTORY ) HTMLPurifier . Internal change ========================== -4.7.0, unknown release date +4.7.0, released 2015-08-04 # opacity is now considered a "tricky" CSS property rather than a proprietary one. ! %AutoFormat.RemoveEmpty.Predicate for specifying exactly when diff --git a/TODO b/TODO index 7db34a9c..a92abf28 100644 --- a/TODO +++ b/TODO @@ -32,7 +32,7 @@ Things to do as soon as possible: FUTURE VERSIONS --------------- -4.6 release [OMG CONFIG PONIES] +4.8 release [OMG CONFIG PONIES] ! Fix Printer. It's from the old days when we didn't have decent XML classes ! Factor demo.php into a set of Printer classes, and then create a stub file for users here (inside the actual HTML Purifier library) diff --git a/VERSION b/VERSION index 28446a5e..1163055e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -4.6.0 \ No newline at end of file +4.7.0 \ No newline at end of file diff --git a/WHATSNEW b/WHATSNEW index 7464cbc3..4e5eb2b6 100644 --- a/WHATSNEW +++ b/WHATSNEW @@ -1,5 +1,4 @@ -HTML Purifier 4.6.0 is a major security release, fixing numerous bad -quadratic asymptotics in HTML Purifier's core algorithms. Most users will -see a decent speedup on large inputs, although small inputs may take -longer. Additionally, the secure URI munging algorithm has changed to -do a proper HMAC. There are some other miscellaneous bugfixes as well. +HTML Purifier 4.7.0 is a bugfix release, collecting two years +worth of accumulated bug fixes. Highlighted bugfixes are updated +YouTube filter code, corrected rgb() CSS parsing, and one new +configuration option, %AutoFormat.RemoveEmpty.Predicate. diff --git a/library/HTMLPurifier.includes.php b/library/HTMLPurifier.includes.php index 9b7b88a8..fdb58c2d 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 4.6.0 + * @version 4.7.0 * * @warning * You must *not* include any other HTML Purifier files before this file, diff --git a/library/HTMLPurifier.php b/library/HTMLPurifier.php index 6f654fde..c6041bc1 100644 --- a/library/HTMLPurifier.php +++ b/library/HTMLPurifier.php @@ -19,7 +19,7 @@ */ /* - HTML Purifier 4.6.0 - Standards Compliant HTML Filtering + HTML Purifier 4.7.0 - Standards Compliant HTML Filtering Copyright (C) 2006-2008 Edward Z. Yang This library is free software; you can redistribute it and/or @@ -58,12 +58,12 @@ class HTMLPurifier * Version of HTML Purifier. * @type string */ - public $version = '4.6.0'; + public $version = '4.7.0'; /** * Constant with version of HTML Purifier. */ - const VERSION = '4.6.0'; + const VERSION = '4.7.0'; /** * Global configuration object. diff --git a/library/HTMLPurifier/Config.php b/library/HTMLPurifier/Config.php index 99781e0b..2b2db0c2 100644 --- a/library/HTMLPurifier/Config.php +++ b/library/HTMLPurifier/Config.php @@ -21,7 +21,7 @@ class HTMLPurifier_Config * HTML Purifier's version * @type string */ - public $version = '4.6.0'; + public $version = '4.7.0'; /** * Whether or not to automatically finalize diff --git a/maintenance/add-vimline.php b/maintenance/add-vimline.php index 34a177f2..d6a8eb20 100644 --- a/maintenance/add-vimline.php +++ b/maintenance/add-vimline.php @@ -35,7 +35,6 @@ foreach ($files as $file) { postfix_is('.phpt', $file) || postfix_is('VERSION', $file) || postfix_is('WHATSNEW', $file) || - postfix_is('FOCUS', $file) || postfix_is('configdoc/usage.xml', $file) || postfix_is('library/HTMLPurifier.includes.php', $file) || postfix_is('library/HTMLPurifier.safe-includes.php', $file) || diff --git a/maintenance/update-freshmeat.php b/maintenance/update-freshmeat.php deleted file mode 100644 index 4d73c76a..00000000 --- a/maintenance/update-freshmeat.php +++ /dev/null @@ -1,161 +0,0 @@ -#!/usr/bin/php - 'utf-8', - ); - - /** - * This array defines shortcut method signatures for dealing with simple - * XML RPC methods. More complex ones (publish_release) should use the named parameter - * syntax. - */ - public $signatures = array( - 'login' => array('username', 'password'), - 'fetch_branch_list' => array('project_name'), - 'fetch_release' => array('project_name', 'branch_name', 'version'), - 'withdraw_release' => array('project_name', 'branch_name', 'version'), - ); - - protected $sid = null; - - /** - * @param $username Username to login with - * @param $password Password to login with - */ - public function __construct($username = null, $password = null) - { - if ($username && $password) { - $this->login($username, $password); - } - } - - /** - * Performs a raw XML RPC call to self::URL - */ - protected function call($method, $params) - { - $request = xmlrpc_encode_request($method, $params, $this->encodeOptions); - $ch = curl_init(); - curl_setopt($ch, CURLOPT_URL, self::URL); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); - curl_setopt($ch, CURLOPT_TIMEOUT, 1); - curl_setopt($ch, CURLOPT_HTTPHEADER, array( - 'Content-type: text/xml', - 'Content-length: ' . strlen($request) - )); - curl_setopt($ch, CURLOPT_POSTFIELDS, $request); - $data = curl_exec($ch); - if ($errno = curl_errno($ch)) { - throw new Exception("Curl error [$errno]: " . curl_error($ch)); - } else { - curl_close($ch); - return xmlrpc_decode($data); - } - } - - /** - * Performs an XML RPC call to Freshmeat. - * @param $name Name of method to call, can be methodName or method_name - * @param $args Arguments of call, in form array('key1', 'val1', 'key2' ...) - */ - public function __call($name, $args) - { - $method = $this->camelToUnderscore($name); - $params = array(); - if ($this->sid) $params['SID'] = $this->sid; - if (isset($this->signatures[$method])) { - for ($i = 0, $c = count($this->signatures[$method]); $i < $c; $i++) { - $params[$this->signatures[$method][$i]] = $args[$i]; - } - } else { - for ($i = 0, $c = count($args); $i + 1 < $c; $i += 2) { - $params[$args[$i]] = $args[$i + 1]; - } - } - $result = $this->call($method, $params); - switch ($method) { - case 'login': - $this->sid = $result['SID']; - break; - case 'logout': - $this->sid = null; - break; - } - if ($this->chatty) print_r($result); - return $result; - } - - /** - * Munge methodName to method_name - */ - private function camelToUnderscore($name) - { - $method = ''; - for ($i = 0, $c = strlen($name); $i < $c; $i++) { - $v = $name[$i]; - if (ctype_lower($v)) $method .= $v; - else $method .= '_' . strtolower($v); - } - return $method; - } - - /** - * Automatically logout at end of scope - */ - public function __destruct() - { - if ($this->sid) $this->logout(); - } - -} - -$rpc = new XmlRpc_Freshmeat($argv[1], $argv[2]); -$rpc->chatty = true; - -$project = 'htmlpurifier'; -$branch = 'Default'; -$version = file_get_contents('../VERSION'); - -$result = $rpc->fetchRelease($project, $branch, $version); -if (!isset($result['faultCode'])) { - echo "Freshmeat release already exists.\n"; - exit(0); -} - -$changes = strtr(file_get_contents('../WHATSNEW'), array("\r" => '', "\n" => ' ')); -$focus = (int) trim(file_get_contents('../FOCUS')); - -if (strlen($changes) > 600) { - echo "WHATSNEW entry is too long.\n"; - exit(1); -} - -$rpc->publishRelease( - 'project_name', $project, - 'branch_name', $branch, - 'version', $version, - 'changes', $changes, - 'release_focus', $focus, - 'url_tgz', "http://htmlpurifier.org/releases/htmlpurifier-$version.tar.gz", - 'url_zip', "http://htmlpurifier.org/releases/htmlpurifier-$version.zip", - 'url_changelog', "http://htmlpurifier.org/svnroot/htmlpurifier/tags/$version/NEWS" -); - -// vim: et sw=4 sts=4 -- 2.11.4.GIT