0
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2024-11-09 23:28:42 +00:00

[2.1.0] Two tiny bugfixes:

- Remove contents of <style> tags
- Use XHTMLStrict Tidy routines for XHTML 1.1

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1311 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang 2007-07-11 20:06:15 +00:00
parent e7e81c0a5b
commit 732fe5cad7
3 changed files with 5 additions and 5 deletions

6
NEWS
View File

@ -18,6 +18,9 @@ NEWS ( CHANGELOG and HISTORY ) HTMLPurifier
need are not allowed need are not allowed
- ConfigForm's compactification of directive names is now configurable - ConfigForm's compactification of directive names is now configurable
- AutoParagraph autoformatter algorithm refined after field-testing - AutoParagraph autoformatter algorithm refined after field-testing
- XHTML 1.1 now applies XHTML 1.0 Strict cleanup routines, namely
blockquote wrapping
- Contents of <style> tags removed by default when tags are removed
. HTMLPurifier_Config->getSerial() implemented, this is extremely useful . HTMLPurifier_Config->getSerial() implemented, this is extremely useful
for output cache invalidation for output cache invalidation
. ConfigForm printer now can retrieve CSS and JS files as strings, in . ConfigForm printer now can retrieve CSS and JS files as strings, in
@ -29,9 +32,6 @@ NEWS ( CHANGELOG and HISTORY ) HTMLPurifier
. ConfigForm generates textareas instead of text inputs for lists, hashes, . ConfigForm generates textareas instead of text inputs for lists, hashes,
lookups, text and itext fields lookups, text and itext fields
2.0.2, unknown release date
(none)
2.0.1, released 2007-06-27 2.0.1, released 2007-06-27
! Tag auto-closing now based on a ChildDef heuristic rather than a ! Tag auto-closing now based on a ChildDef heuristic rather than a
manually set auto_close array; some behavior may change manually set auto_close array; some behavior may change

View File

@ -216,7 +216,7 @@ class HTMLPurifier_HTMLModuleManager
$this->doctypes->register( $this->doctypes->register(
'XHTML 1.1', true, 'XHTML 1.1', true,
array_merge($common, $xml), array_merge($common, $xml),
array('Tidy_Strict', 'Tidy_XHTML', 'Tidy_Proprietary'), // Tidy_XHTML1_1 array('Tidy_Strict', 'Tidy_XHTML', 'Tidy_Proprietary', 'Tidy_XHTMLStrict'), // Tidy_XHTML1_1
array(), array(),
'-//W3C//DTD XHTML 1.1//EN', '-//W3C//DTD XHTML 1.1//EN',
'http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd' 'http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd'

View File

@ -122,7 +122,7 @@ class HTMLPurifier_Strategy_RemoveForeignElements extends HTMLPurifier_Strategy
} else { } else {
// check if we need to destroy all of the tag's children // check if we need to destroy all of the tag's children
// CAN BE GENERICIZED // CAN BE GENERICIZED
if ($token->name == 'script' && $remove_script_contents) { if (($token->name == 'script' && $remove_script_contents) || $token->name == 'style') {
if ($token->type == 'start') { if ($token->type == 'start') {
$remove_until = $token->name; $remove_until = $token->name;
} elseif ($token->type == 'empty') { } elseif ($token->type == 'empty') {