mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-01-02 21:01:52 +00:00
Remove unnecessary disablement of autoload (#364)
This commit is contained in:
parent
0176ef4bb6
commit
b4136da73c
library/HTMLPurifier
@ -71,7 +71,7 @@ class HTMLPurifier_DefinitionCacheFactory
|
|||||||
return $this->caches[$method][$type];
|
return $this->caches[$method][$type];
|
||||||
}
|
}
|
||||||
if (isset($this->implementations[$method]) &&
|
if (isset($this->implementations[$method]) &&
|
||||||
class_exists($class = $this->implementations[$method], false)) {
|
class_exists($class = $this->implementations[$method])) {
|
||||||
$cache = new $class($type);
|
$cache = new $class($type);
|
||||||
} else {
|
} else {
|
||||||
if ($method != 'Serializer') {
|
if ($method != 'Serializer') {
|
||||||
|
@ -109,7 +109,7 @@ class HTMLPurifier_LanguageFactory
|
|||||||
} else {
|
} else {
|
||||||
$class = 'HTMLPurifier_Language_' . $pcode;
|
$class = 'HTMLPurifier_Language_' . $pcode;
|
||||||
$file = $this->dir . '/Language/classes/' . $code . '.php';
|
$file = $this->dir . '/Language/classes/' . $code . '.php';
|
||||||
if (file_exists($file) || class_exists($class, false)) {
|
if (file_exists($file) || class_exists($class)) {
|
||||||
$lang = new $class($config, $context);
|
$lang = new $class($config, $context);
|
||||||
} else {
|
} else {
|
||||||
// Go fallback
|
// Go fallback
|
||||||
|
@ -101,7 +101,7 @@ class HTMLPurifier_Lexer
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (class_exists('DOMDocument', false) &&
|
if (class_exists('DOMDocument') &&
|
||||||
method_exists('DOMDocument', 'loadHTML') &&
|
method_exists('DOMDocument', 'loadHTML') &&
|
||||||
!extension_loaded('domxml')
|
!extension_loaded('domxml')
|
||||||
) {
|
) {
|
||||||
|
Loading…
Reference in New Issue
Block a user