0
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2024-11-09 15:28:40 +00: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

1
NEWS
View File

@ -38,6 +38,7 @@ NEWS ( CHANGELOG and HISTORY ) HTMLPurifier
- Fix error in documentation regarding %Filter.ExtractStyleBlocks
- Prevent <![CDATA[<body></body>]]> 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

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';