1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-08-06 14:16:32 +02:00

[1.7.0] Implement HTMLDefinition cache (very hacked together, but long unit test times were driving me crazy!)

- Add extra protection in AttrDef_URI against phantom Schemes
- Doctype moved from config to HTMLDefinition
- AttrDef_URITest mocks have more generic object parameters to deal with PHP4's copy-happy behavior

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1089 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang
2007-05-23 03:27:36 +00:00
parent 7579932948
commit e180b7689e
9 changed files with 88 additions and 37 deletions

View File

@@ -71,10 +71,8 @@ class HTMLPurifier_Generator
if (!$config) $config = HTMLPurifier_Config::createDefault();
$this->_scriptFix = $config->get('Output', 'CommentScriptContents');
$doctype = $config->getDoctype();
$this->_xhtml = $doctype->xml;
$this->_def = $config->getHTMLDefinition();
$this->_xhtml = $this->_def->doctype->xml;
if (!$tokens) return '';
for ($i = 0, $size = count($tokens); $i < $size; $i++) {