mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-08-05 05:37:49 +02:00
[1.7.0] Make doctype object available from config, switch generator over to it.
git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1076 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
@@ -84,12 +84,11 @@ class HTMLPurifier_Generator
|
||||
$html = '';
|
||||
if (!$config) $config = HTMLPurifier_Config::createDefault();
|
||||
$this->_clean_utf8 = $config->get('Output', 'EnableRedundantUTF8Cleaning');
|
||||
|
||||
// this should replaced with a query to the Doctype object in
|
||||
// config to determine whether or not this is an XML-based language
|
||||
$this->_xhtml = $config->get('HTML', 'XHTML');
|
||||
|
||||
$this->_scriptFix = $config->get('Output', 'CommentScriptContents');
|
||||
|
||||
$doctype = $config->getDoctype();
|
||||
$this->_xhtml = $doctype->xml;
|
||||
|
||||
if (!$tokens) return '';
|
||||
for ($i = 0, $size = count($tokens); $i < $size; $i++) {
|
||||
if ($this->_scriptFix && $tokens[$i]->name === 'script') {
|
||||
|
Reference in New Issue
Block a user