mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-08-02 20:27:40 +02:00
[1.4.x?] Alright, have both PHP5 and DOMDocument requirements for DOMLex checked.
git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@766 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
@@ -151,7 +151,8 @@ class HTMLPurifier_Lexer
|
|||||||
$lexer = $prototype;
|
$lexer = $prototype;
|
||||||
}
|
}
|
||||||
if (empty($lexer)) {
|
if (empty($lexer)) {
|
||||||
if (class_exists('DOMDocument')) { // check for DOM support
|
if (version_compare(PHP_VERSION, "5", ">=") && // check for PHP5
|
||||||
|
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 {
|
||||||
|
Reference in New Issue
Block a user