diff --git a/NEWS b/NEWS index 5722b534..c1a3ce7e 100644 --- a/NEWS +++ b/NEWS @@ -29,6 +29,7 @@ ERRATA on the same element without emitting errors. - Iconv uses set_error_handler instead of shut-up operator - Add protection against imagecrash attack with CSS height/width +- HTMLPurifier::getInstance() renamed to HTMLPurifier::instance() for consistency 2.1.3, released 2007-11-05 ! tests/multitest.php allows you to test multiple versions by running diff --git a/library/HTMLPurifier.php b/library/HTMLPurifier.php index e9dfe5f4..2f622c79 100644 --- a/library/HTMLPurifier.php +++ b/library/HTMLPurifier.php @@ -213,7 +213,7 @@ class HTMLPurifier * @param $prototype Optional prototype HTMLPurifier instance to * overload singleton with. */ - function &getInstance($prototype = null) { + function &instance($prototype = null) { static $htmlpurifier; if (!$htmlpurifier || $prototype) { if (is_a($prototype, 'HTMLPurifier')) { @@ -227,6 +227,9 @@ class HTMLPurifier return $htmlpurifier; } + function &getInstance($prototype = null) { + return HTMLPurifier::instance($prototype); + } }