mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-01-03 13:21:51 +00:00
[2.1.3] Rename configuration directive
git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1416 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
parent
28c29656af
commit
ccca8cc34f
2
NEWS
2
NEWS
@ -14,6 +14,8 @@ NEWS ( CHANGELOG and HISTORY ) HTMLPurifier
|
|||||||
on some systems.
|
on some systems.
|
||||||
- Injector algorithm further refined: off-by-one error regarding skip
|
- Injector algorithm further refined: off-by-one error regarding skip
|
||||||
counts for dormant injectors fixed
|
counts for dormant injectors fixed
|
||||||
|
. %Core.AcceptFullDocuments renamed to %Core.ConvertDocumentToFragment
|
||||||
|
to better communicate its purpose
|
||||||
|
|
||||||
2.1.2, released 2007-09-03
|
2.1.2, released 2007-09-03
|
||||||
! Implemented Object module for trusted users
|
! Implemented Object module for trusted users
|
||||||
|
@ -13,11 +13,14 @@ if (version_compare(PHP_VERSION, "5", ">=")) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
HTMLPurifier_ConfigSchema::define(
|
HTMLPurifier_ConfigSchema::define(
|
||||||
'Core', 'AcceptFullDocuments', true, 'bool',
|
'Core', 'ConvertDocumentToFragment', true, 'bool', '
|
||||||
'This parameter determines whether or not the filter should accept full '.
|
This parameter determines whether or not the filter should convert
|
||||||
'HTML documents, not just HTML fragments. When on, it will '.
|
input that is a full document with html and body tags to a fragment
|
||||||
'drop all sections except the content between body.'
|
of just the contents of a body tag. This parameter is simply something
|
||||||
);
|
HTML Purifier can do during an edge-case: for most inputs, this
|
||||||
|
processing is not necessary.
|
||||||
|
');
|
||||||
|
HTMLPurifier_ConfigSchema::defineAlias('Core', 'AcceptFullDocuments', 'Core', 'ConvertDocumentToFragment');
|
||||||
|
|
||||||
HTMLPurifier_ConfigSchema::define(
|
HTMLPurifier_ConfigSchema::define(
|
||||||
'Core', 'LexerImpl', null, 'mixed/null', '
|
'Core', 'LexerImpl', null, 'mixed/null', '
|
||||||
@ -316,7 +319,7 @@ class HTMLPurifier_Lexer
|
|||||||
function normalize($html, $config, &$context) {
|
function normalize($html, $config, &$context) {
|
||||||
|
|
||||||
// extract body from document if applicable
|
// extract body from document if applicable
|
||||||
if ($config->get('Core', 'AcceptFullDocuments')) {
|
if ($config->get('Core', 'ConvertDocumentToFragment')) {
|
||||||
$html = $this->extractBody($html);
|
$html = $this->extractBody($html);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user