mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-01-03 05:11:52 +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:
parent
e013bc9126
commit
0423985b45
1
NEWS
1
NEWS
@ -38,6 +38,7 @@ NEWS ( CHANGELOG and HISTORY ) HTMLPurifier
|
|||||||
- Fix error in documentation regarding %Filter.ExtractStyleBlocks
|
- Fix error in documentation regarding %Filter.ExtractStyleBlocks
|
||||||
- Prevent <![CDATA[<body></body>]]> from triggering %Core.ConvertDocumentToFragment
|
- Prevent <![CDATA[<body></body>]]> from triggering %Core.ConvertDocumentToFragment
|
||||||
- Fix bug with inline elements in blockquotes conflicting with strict doctype
|
- 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
|
. Strategy_MakeWellFormed now operates in-place, saving memory and allowing
|
||||||
for more interesting filter-backtracking
|
for more interesting filter-backtracking
|
||||||
. New HTMLPurifier_Injector->rewind() functionality, allows injectors to rewind
|
. New HTMLPurifier_Injector->rewind() functionality, allows injectors to rewind
|
||||||
|
@ -88,7 +88,7 @@ class HTMLPurifier_Lexer
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (class_exists('DOMDocument')) {
|
if (class_exists('DOMDocument') && method_exists('DOMDocument', 'loadHTML')) {
|
||||||
// check for DOM support, because, surprisingly enough,
|
// check for DOM support, because, surprisingly enough,
|
||||||
// it's *not* part of the core!
|
// it's *not* part of the core!
|
||||||
$lexer = 'DOMLex';
|
$lexer = 'DOMLex';
|
||||||
|
Loading…
Reference in New Issue
Block a user