1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-08-05 13:47:24 +02:00

[1.7.0] Add unit test for AttrCollections

- Fixed bug where recursive attribute collections would result in infinite loop
- Fixed bug with deep inclusions in attribute collections
- Reset doctype object if HTML or Attr is changed
- Add accessor functions to AttrTypes, unit tested class

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1077 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang
2007-05-20 19:29:05 +00:00
parent e4b621eec2
commit 3f06d8316c
7 changed files with 192 additions and 16 deletions

View File

@@ -168,9 +168,13 @@ class HTMLPurifier_Config
return;
}
$this->conf[$namespace][$key] = $value;
// reset definitions if the directives they depend on changed
// this is a very costly process, so it's discouraged
// with finalization
if ($namespace == 'HTML' || $namespace == 'Attr') {
// reset HTML definition if relevant attributes changed
$this->html_definition = null;
$this->doctype = null;
}
if ($namespace == 'CSS') {
$this->css_definition = null;