diff --git a/NEWS b/NEWS index 0027c556..c44b2983 100644 --- a/NEWS +++ b/NEWS @@ -14,6 +14,8 @@ NEWS ( CHANGELOG and HISTORY ) HTMLPurifier on some systems. - Injector algorithm further refined: off-by-one error regarding skip counts for dormant injectors fixed +. %Core.AcceptFullDocuments renamed to %Core.ConvertDocumentToFragment + to better communicate its purpose 2.1.2, released 2007-09-03 ! Implemented Object module for trusted users diff --git a/library/HTMLPurifier/Lexer.php b/library/HTMLPurifier/Lexer.php index 78abebd0..22ef1d6d 100644 --- a/library/HTMLPurifier/Lexer.php +++ b/library/HTMLPurifier/Lexer.php @@ -13,11 +13,14 @@ if (version_compare(PHP_VERSION, "5", ">=")) { } HTMLPurifier_ConfigSchema::define( - 'Core', 'AcceptFullDocuments', true, 'bool', - 'This parameter determines whether or not the filter should accept full '. - 'HTML documents, not just HTML fragments. When on, it will '. - 'drop all sections except the content between body.' -); + 'Core', 'ConvertDocumentToFragment', true, 'bool', ' +This parameter determines whether or not the filter should convert +input that is a full document with html and body tags to a fragment +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( 'Core', 'LexerImpl', null, 'mixed/null', ' @@ -316,7 +319,7 @@ class HTMLPurifier_Lexer function normalize($html, $config, &$context) { // extract body from document if applicable - if ($config->get('Core', 'AcceptFullDocuments')) { + if ($config->get('Core', 'ConvertDocumentToFragment')) { $html = $this->extractBody($html); }