1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-07-13 10:46:17 +02:00

Release 2.0.1, merged in 1181 to HEAD.

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/branches/strict@1255 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang
2007-06-27 14:30:45 +00:00
parent 42858ad594
commit 495164e938
326 changed files with 3025 additions and 826 deletions

View File

@ -31,4 +31,3 @@ class HTMLPurifier_HTMLModule_Bdo extends HTMLPurifier_HTMLModule
}
?>

View File

@ -24,4 +24,3 @@ class HTMLPurifier_HTMLModule_CommonAttributes extends HTMLPurifier_HTMLModule
);
}
?>

View File

@ -38,4 +38,3 @@ class HTMLPurifier_HTMLModule_Edit extends HTMLPurifier_HTMLModule
}
?>

View File

@ -30,4 +30,3 @@ class HTMLPurifier_HTMLModule_Hypertext extends HTMLPurifier_HTMLModule
}
?>

View File

@ -34,4 +34,3 @@ class HTMLPurifier_HTMLModule_Image extends HTMLPurifier_HTMLModule
}
?>

View File

@ -138,4 +138,3 @@ class HTMLPurifier_HTMLModule_Legacy extends HTMLPurifier_HTMLModule
}
?>

View File

@ -26,8 +26,7 @@ class HTMLPurifier_HTMLModule_List extends HTMLPurifier_HTMLModule
$this->addElement('ul', true, 'List', 'Required: li', 'Common');
$this->addElement('dl', true, 'List', 'Required: dt | dd', 'Common');
$li =& $this->addElement('li', true, false, 'Flow', 'Common');
$li->auto_close = array('li' => true);
$this->addElement('li', true, false, 'Flow', 'Common');
$this->addElement('dd', true, false, 'Flow', 'Common');
$this->addElement('dt', true, false, 'Inline', 'Common');
@ -35,4 +34,3 @@ class HTMLPurifier_HTMLModule_List extends HTMLPurifier_HTMLModule
}
?>

View File

@ -13,4 +13,3 @@ class HTMLPurifier_HTMLModule_NonXMLCommonAttributes extends HTMLPurifier_HTMLMo
);
}
?>

View File

@ -30,4 +30,3 @@ class HTMLPurifier_HTMLModule_Presentation extends HTMLPurifier_HTMLModule
}
?>

View File

@ -5,14 +5,6 @@
WARNING: THIS MODULE IS EXTREMELY DANGEROUS AS IT ENABLES INLINE SCRIPTING
INSIDE HTML PURIFIER DOCUMENTS. USE ONLY WITH TRUSTED USER INPUT!!!
Usage:
require_once 'HTMLPurifier/HTMLModule/Scripting.php';
$def =& $config->getHTMLDefinition(true); // get the raw version
$def->manager->addModule('Scripting');
This must come before any other calls to getHTMLDefinition()
*/
/**
@ -63,9 +55,9 @@ class HTMLPurifier_HTMLModule_Scripting extends HTMLPurifier_HTMLModule
);
$this->info['script']->content_model = '#PCDATA';
$this->info['script']->content_model_type = 'optional';
$this->info['script']->attr_transform_pre['type'] =
$this->info['script']->attr_transform_post['type'] =
new HTMLPurifier_AttrTransform_ScriptRequired();
}
}
?>

View File

@ -24,4 +24,3 @@ class HTMLPurifier_HTMLModule_StyleAttribute extends HTMLPurifier_HTMLModule
}
?>

View File

@ -56,10 +56,7 @@ class HTMLPurifier_HTMLModule_Tables extends HTMLPurifier_HTMLModule
$cell_align
);
$this->addElement('col', true, false, 'Empty', 'Common', $cell_col);
$colgroup =& $this->addElement('colgroup', true, false, 'Optional: col', 'Common', $cell_col);
$colgroup->auto_close = $this->makeLookup(
'thead', 'tbody', 'tfoot', 'tr'
);
$this->addElement('colgroup', true, false, 'Optional: col', 'Common', $cell_col);
$this->addElement('tbody', true, false, 'Required: tr', 'Common', $cell_align);
$this->addElement('thead', true, false, 'Required: tr', 'Common', $cell_align);
@ -69,4 +66,3 @@ class HTMLPurifier_HTMLModule_Tables extends HTMLPurifier_HTMLModule
}
?>

View File

@ -22,4 +22,3 @@ class HTMLPurifier_HTMLModule_Target extends HTMLPurifier_HTMLModule
}
?>

View File

@ -55,17 +55,10 @@ class HTMLPurifier_HTMLModule_Text extends HTMLPurifier_HTMLModule
$this->addElement('h6', true, 'Heading', 'Inline', 'Common');
// Block Structural -----------------------------------------------
$p =& $this->addElement('p', true, 'Block', 'Inline', 'Common');
// this seems really ad hoc: implementing some general
// heuristics would probably be better
$p->auto_close = $this->makeLookup(
'address', 'blockquote', 'dd', 'dir', 'div', 'dl', 'dt',
'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'hr', 'ol', 'p', 'pre',
'table', 'ul' );
$this->addElement('p', true, 'Block', 'Inline', 'Common');
$this->addElement('div', true, 'Block', 'Flow', 'Common');
}
}
?>

View File

@ -238,4 +238,4 @@ class HTMLPurifier_HTMLModule_Tidy extends HTMLPurifier_HTMLModule
}
?>

View File

@ -15,4 +15,3 @@ class HTMLPurifier_HTMLModule_Tidy_Proprietary extends
}
?>

View File

@ -18,4 +18,3 @@ class HTMLPurifier_HTMLModule_Tidy_XHTML extends
}
?>

View File

@ -190,4 +190,3 @@ class HTMLPurifier_HTMLModule_Tidy_Strict extends
var $defaultLevel = 'light';
}
?>

View File

@ -24,4 +24,3 @@ class HTMLPurifier_HTMLModule_Tidy_XHTMLStrict extends
}
?>

View File

@ -13,4 +13,3 @@ class HTMLPurifier_HTMLModule_XMLCommonAttributes extends HTMLPurifier_HTMLModul
);
}
?>