Commit d8ebfa91 authored by Francois Marier's avatar Francois Marier Committed by Gerrit Code Review
Browse files

Merge "Make clean_html more forgiving when html filters are missing"

parents 125d9a7c fd28dbf2
......@@ -2754,9 +2754,11 @@ function clean_html($text, $xhtml=false) {
$builtinfilters = array('YouTube', 'TeacherTube', 'SlideShare', 'SciVee', 'GoogleVideo');
if (!in_array($filter->file, $builtinfilters)) {
require_once(get_config('libroot') . 'htmlpurifiercustom/' . $filter->file . '.php');
include_once(get_config('libroot') . 'htmlpurifiercustom/' . $filter->file . '.php');
$classname = 'HTMLPurifier_Filter_' . $filter->file;
$customfilters[] = new $classname();
if (class_exists($classname)) {
$customfilters[] = new $classname();
}
}
}
$config->set('Filter.Custom', $customfilters);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment