mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2024-12-23 00:41:52 +00:00
Make PHP5 lexer default DOMLex.
git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@84 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
parent
5bcb3c60cd
commit
9180d6256f
@ -21,8 +21,13 @@ class HTMLPurifier_Lexer
|
|||||||
$lexer = $prototype;
|
$lexer = $prototype;
|
||||||
}
|
}
|
||||||
if (empty($lexer)) {
|
if (empty($lexer)) {
|
||||||
require_once 'HTMLPurifier/Lexer/DirectLex.php';
|
if (version_compare(PHP_VERSION, '5', '>=')) {
|
||||||
$lexer = new HTMLPurifier_Lexer_DirectLex();
|
require_once 'HTMLPurifier/Lexer/DOMLex.php';
|
||||||
|
$lexer = new HTMLPurifier_Lexer_DOMLex();
|
||||||
|
} else {
|
||||||
|
require_once 'HTMLPurifier/Lexer/DirectLex.php';
|
||||||
|
$lexer = new HTMLPurifier_Lexer_DirectLex();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return $lexer;
|
return $lexer;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user