mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2024-12-22 08:21:52 +00:00
[3.1.0] Allow arbitrary whitespace in %HTML.Allowed
git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1707 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
parent
ce46fb618c
commit
e0c0d8eab6
1
NEWS
1
NEWS
@ -31,6 +31,7 @@ NEWS ( CHANGELOG and HISTORY ) HTMLPurifier
|
||||
! Added HTMLPurifier::VERSION constant
|
||||
! Commas, not dashes, used for serializer IDs. This change is forwards-compatible
|
||||
and allows for version numbers like "3.1.0-dev".
|
||||
! %HTML.Allowed deals gracefully with whitespace anywhere, anytime!
|
||||
- InterchangeBuilder now alphabetizes its lists
|
||||
- Validation error in configdoc output fixed
|
||||
- Iconv and other encoding errors muted even with custom error handlers that
|
||||
|
8
TODO
8
TODO
@ -15,8 +15,7 @@ afraid to cast your vote for the next feature to be implemented!
|
||||
in the scanner
|
||||
- Quick optimizations for empty strings and strings without HTML (make sure
|
||||
%HTML.Parent is accounted for) - Denis
|
||||
- Write a var_export and memcached DefinitionCache - Denis
|
||||
- Make %HTML.Allowed accept arbitrary whitespace - Denis
|
||||
- Ensure cache files by Serializer are chmod'ed properly - Denis
|
||||
|
||||
FUTURE VERSIONS
|
||||
---------------
|
||||
@ -83,9 +82,11 @@ AutoFormat
|
||||
|
||||
Optimizations
|
||||
- Reduce size of internal data-structures (esp. HTMLDefinition)
|
||||
- Research memory usage of objects versus arrays
|
||||
- Combine multiple strategies into a single, single-pass strategy
|
||||
- Get PH5P working with the latest versions of DOM, which have much more
|
||||
stringent error checking procedures. Maybe convert straight to tokens.
|
||||
- Get rid of set_include_path(). Save this for another major release.
|
||||
|
||||
Neat feature related
|
||||
! Factor demo.php into a set of Printer classes, and then create a stub
|
||||
@ -103,6 +104,9 @@ Neat feature related
|
||||
empty-cells:show is applied to have compatibility with Internet Explorer
|
||||
- Table of Contents generation (XHTML Compiler might be reusable). May also
|
||||
be out-of-band information.
|
||||
- Full set of color keywords. Also, a way to add onto them without
|
||||
finalizing the configuration object.
|
||||
- Write a var_export and memcached DefinitionCache - Denis
|
||||
|
||||
Maintenance related (slightly boring)
|
||||
# CHMOD install script for PEAR installs
|
||||
|
@ -369,6 +369,8 @@ class HTMLPurifier_HTMLDefinition extends HTMLPurifier_Definition
|
||||
*/
|
||||
public function parseTinyMCEAllowedList($list) {
|
||||
|
||||
$list = str_replace(array(' ', "\t"), '', $list);
|
||||
|
||||
$elements = array();
|
||||
$attributes = array();
|
||||
|
||||
|
@ -56,10 +56,15 @@ class HTMLPurifier_HTMLDefinitionTest extends HTMLPurifier_Harness
|
||||
strong
|
||||
a[href|title]
|
||||
'),
|
||||
array(array('span' => true, 'strong' => true, 'a' => true),
|
||||
$val = array(array('span' => true, 'strong' => true, 'a' => true),
|
||||
array('span.style' => true, 'a.href' => true, 'a.title' => true))
|
||||
);
|
||||
|
||||
$this->assertEqual(
|
||||
$def->parseTinyMCEAllowedList(' span [ style ], strong'."\n\t".'a[href | title]'),
|
||||
$val
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
function test_Allowed() {
|
||||
|
Loading…
Reference in New Issue
Block a user