Skip to content
This repository has been archived by the owner on Jan 26, 2021. It is now read-only.

Commit

Permalink
fix(purifier): fixes deprecated warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Eduardo Campaña committed Jan 17, 2019
1 parent 99d4109 commit f4199f6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions libs/purifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function load_purifier() {
$htmlpurifier_dir = $upload['basedir'] . DS . 'frontity' . DS . 'htmlpurifier';

if (is_dir($htmlpurifier_dir)) {
$config->set('Cache', 'SerializerPath', $htmlpurifier_dir);
$config->set('Cache.SerializerPath', $htmlpurifier_dir);
} else {
$config->set('Core', 'DefinitionCache', null);
}
Expand All @@ -32,20 +32,20 @@ function load_purifier() {
$config->set('URI.SafeIframeRegexp', '/.+/');

// Rule: <font>, <center> and <br> not allowed.
$config->set('HTML', 'ForbiddenElements', array('font', 'center', 'br'));
$config->set('HTML.ForbiddenElements', array('font', 'center', 'br'));

// Rule: Remove empty elements.
$config->set('AutoFormat', 'RemoveEmpty', true);
$config->set('AutoFormat', 'RemoveEmpty.Predicate', array(
$config->set('AutoFormat.RemoveEmpty', true);
$config->set('AutoFormat.RemoveEmpty.Predicate', array(
'div' => array(0 => 'class'),
'span' => array(0 => 'class'),
'iframe' => array(0 => 'src'),
'colgroup' => array(),
'th' => array(),
'td' => array(),
));
$config->set('AutoFormat', 'RemoveEmpty.RemoveNbsp', true);
$config->set('AutoFormat', 'AutoParagraph', true);
$config->set('AutoFormat.RemoveEmpty.RemoveNbsp', true);
$config->set('AutoFormat.AutoParagraph', true);

// IMG Attributes
// This is defined in HTML5Definitions.php line 108 (DON'T OVERWRITE IT!!)
Expand Down

0 comments on commit f4199f6

Please sign in to comment.