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

Factor some stuff into the Definition, add more docs.

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@134 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang
2006-07-30 22:57:54 +00:00
parent 558c49a92d
commit 2b5589c884
3 changed files with 34 additions and 3 deletions

View File

@@ -14,8 +14,10 @@ class HTMLPurifier_Strategy_FixNesting extends HTMLPurifier_Strategy
function execute($tokens) {
// insert implicit "parent" node, will be removed at end
array_unshift($tokens, new HTMLPurifier_Token_Start('div'));
$tokens[] = new HTMLPurifier_Token_End('div');
$parent_name = $this->definition->info_parent;
array_unshift($tokens, new HTMLPurifier_Token_Start($parent_name));
$tokens[] = new HTMLPurifier_Token_End($parent_name);
for ($i = 0, $size = count($tokens) ; $i < $size; ) {