mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-08-04 21:28:06 +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:
@@ -46,6 +46,11 @@ class HTMLPurifier_Config
|
||||
*/
|
||||
var $autoFinalize = true;
|
||||
|
||||
/**
|
||||
* Instance of HTMLPurifier_Doctype, representing current doctype
|
||||
*/
|
||||
var $doctype;
|
||||
|
||||
/**
|
||||
* @param $definition HTMLPurifier_ConfigSchema that defines what directives
|
||||
* are allowed.
|
||||
@@ -225,6 +230,16 @@ class HTMLPurifier_Config
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the current doctype object
|
||||
*/
|
||||
function getDoctype() {
|
||||
if (!$this->doctype) {
|
||||
$this->getHTMLDefinition();
|
||||
}
|
||||
return $this->doctype;
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads configuration values from an ini file
|
||||
* @param $filename Name of ini file
|
||||
|
Reference in New Issue
Block a user