mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-08-04 21:28:06 +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:
@@ -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';
|
||||
|
Reference in New Issue
Block a user