diff --git a/NEWS b/NEWS index b08c431e..06c071f6 100644 --- a/NEWS +++ b/NEWS @@ -17,6 +17,7 @@ NEWS ( CHANGELOG and HISTORY ) HTMLPurifier ! Configuration documentation looks nicer ! Added %Core.EscapeNonASCIICharacters to workaround loss of Unicode characters while %Core.Encoding is set to a non-UTF-8 encoding. +- Replaced version check with functionality check for DOM . Added smoketest 'all.php', which loads all other smoketests via frames . Implemented AttrDef_CSSURI for url(http://google.com) style declarations . Added convenient single test selector form on test runner diff --git a/library/HTMLPurifier/Lexer.php b/library/HTMLPurifier/Lexer.php index 29e92b66..7e028a2f 100644 --- a/library/HTMLPurifier/Lexer.php +++ b/library/HTMLPurifier/Lexer.php @@ -151,7 +151,7 @@ class HTMLPurifier_Lexer $lexer = $prototype; } if (empty($lexer)) { - if (version_compare(PHP_VERSION, '5', '>=')) { + if (class_exists('DOMDocument')) { // check for DOM support require_once 'HTMLPurifier/Lexer/DOMLex.php'; $lexer = new HTMLPurifier_Lexer_DOMLex(); } else {