1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-08-03 20:58:11 +02:00

Detect if HTML support in DOM is disabled by checking loadHTML().

Signed-off-by: Edward Z. Yang <edwardzyang@thewritingpot.com>
This commit is contained in:
Edward Z. Yang
2008-08-07 18:44:21 -04:00
parent e013bc9126
commit 0423985b45
2 changed files with 2 additions and 1 deletions

View File

@@ -88,7 +88,7 @@ class HTMLPurifier_Lexer
break;
}
if (class_exists('DOMDocument')) {
if (class_exists('DOMDocument') && method_exists('DOMDocument', 'loadHTML')) {
// check for DOM support, because, surprisingly enough,
// it's *not* part of the core!
$lexer = 'DOMLex';