From b3aa5fa0dcc8bfe8ee21b1f209d1df12e840b270 Mon Sep 17 00:00:00 2001 From: "Edward Z. Yang" Date: Fri, 3 Aug 2007 15:11:08 +0000 Subject: [PATCH] [2.1.1] Add prefix directory to include path in standalone: this prevents PEAR from clobbering our unit tests - Add missing include to unit test harness - Add missing unit test for HTMLPurifier::getInstance git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1358 48356398-32a2-884e-a903-53898d9a118a --- NEWS | 7 +++++++ maintenance/merge-library.php | 3 ++- tests/HTMLPurifier/URISchemeTest.php | 1 + tests/HTMLPurifierTest.php | 6 ++++++ 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 43142c28..ded59057 100644 --- a/NEWS +++ b/NEWS @@ -9,6 +9,13 @@ NEWS ( CHANGELOG and HISTORY ) HTMLPurifier . Internal change ========================== +2.2.0, unknown release date +[ no items ] + +2.1.1, unknown release date +. Add prefix directory to include path for standalone, this prevents + other installations from clobbering the standalone's URI schemes + 2.1.0, released 2007-08-02 # flush-htmldefinition-cache.php superseded in favor of a generic flush-definition-cache.php script, you can clear a specific cache diff --git a/maintenance/merge-library.php b/maintenance/merge-library.php index 1033aecd..9ce23e0f 100755 --- a/maintenance/merge-library.php +++ b/maintenance/merge-library.php @@ -180,7 +180,8 @@ echo 'Creating full file...'; $contents = replace_includes(file_get_contents('HTMLPurifier.php')); $contents = str_replace( "define('HTMLPURIFIER_PREFIX', dirname(__FILE__));", - "define('HTMLPURIFIER_PREFIX', dirname(__FILE__) . '/standalone');", + "define('HTMLPURIFIER_PREFIX', dirname(__FILE__) . '/standalone'); +set_include_path(HTMLPURIFIER_PREFIX . PATH_SEPARATOR . get_include_path());", $contents ); file_put_contents('HTMLPurifier.standalone.php', $contents); diff --git a/tests/HTMLPurifier/URISchemeTest.php b/tests/HTMLPurifier/URISchemeTest.php index 6f43d10c..5b1f99a3 100644 --- a/tests/HTMLPurifier/URISchemeTest.php +++ b/tests/HTMLPurifier/URISchemeTest.php @@ -1,6 +1,7 @@ "); ); } + function testGetInstance() { + $purifier = HTMLPurifier::getInstance(); + $purifier2 = HTMLPurifier::getInstance(); + $this->assertReference($purifier, $purifier2); + } + }