1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-08-05 21:57:26 +02:00

Implement lang and xml:lang. Fixed a bunch of bugs too.

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@162 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang
2006-08-05 01:50:13 +00:00
parent 1945ddca5c
commit 8a23710405
11 changed files with 312 additions and 7 deletions

View File

@@ -26,11 +26,16 @@ class HTMLPurifier_Strategy_ValidateAttributes extends HTMLPurifier_Strategy
$d_defs = $this->definition->info_global_attr;
foreach ($tokens as $key => $token) {
if ($token->type !== 'start' && $token->type !== 'end') continue;
if ($token->type !== 'start' && $token->type !== 'empty') continue;
// DEFINITION CALL
$defs = $this->definition->info[$token->name]->attr;
// DEFINITION CALL
foreach ($this->definition->info_attr_transform as $transformer) {
$token = $transformer->transform($token);
}
$attr = $token->attributes;
$changed = false;
foreach ($attr as $attr_key => $value) {