0
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2024-09-19 18:55:19 +00:00

Replaced version check with functionality check for DOM

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@667 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang 2007-01-20 15:07:48 +00:00
parent a8db22dfff
commit 2e16c4a968
2 changed files with 2 additions and 1 deletions

1
NEWS
View File

@ -17,6 +17,7 @@ NEWS ( CHANGELOG and HISTORY ) HTMLPurifier
! Configuration documentation looks nicer ! Configuration documentation looks nicer
! Added %Core.EscapeNonASCIICharacters to workaround loss of Unicode ! Added %Core.EscapeNonASCIICharacters to workaround loss of Unicode
characters while %Core.Encoding is set to a non-UTF-8 encoding. 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 . Added smoketest 'all.php', which loads all other smoketests via frames
. Implemented AttrDef_CSSURI for url(http://google.com) style declarations . Implemented AttrDef_CSSURI for url(http://google.com) style declarations
. Added convenient single test selector form on test runner . Added convenient single test selector form on test runner

View File

@ -151,7 +151,7 @@ class HTMLPurifier_Lexer
$lexer = $prototype; $lexer = $prototype;
} }
if (empty($lexer)) { if (empty($lexer)) {
if (version_compare(PHP_VERSION, '5', '>=')) { if (class_exists('DOMDocument')) { // check for DOM support
require_once 'HTMLPurifier/Lexer/DOMLex.php'; require_once 'HTMLPurifier/Lexer/DOMLex.php';
$lexer = new HTMLPurifier_Lexer_DOMLex(); $lexer = new HTMLPurifier_Lexer_DOMLex();
} else { } else {