diff --git a/NEWS b/NEWS index 4f1c09e5..fc69ea47 100644 --- a/NEWS +++ b/NEWS @@ -38,6 +38,7 @@ NEWS ( CHANGELOG and HISTORY ) HTMLPurifier - Fix error in documentation regarding %Filter.ExtractStyleBlocks - Prevent ]]> from triggering %Core.ConvertDocumentToFragment - Fix bug with inline elements in blockquotes conflicting with strict doctype +- Detect if HTML support is disabled for DOM by checking for loadHTML() method. . Strategy_MakeWellFormed now operates in-place, saving memory and allowing for more interesting filter-backtracking . New HTMLPurifier_Injector->rewind() functionality, allows injectors to rewind diff --git a/library/HTMLPurifier/Lexer.php b/library/HTMLPurifier/Lexer.php index 8c60ab33..03fe032f 100644 --- a/library/HTMLPurifier/Lexer.php +++ b/library/HTMLPurifier/Lexer.php @@ -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';