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

Commit

Permalink
fix(purifier): add exceptions to remove empty elements
Browse files Browse the repository at this point in the history
  • Loading branch information
Eduardo Campaña committed Oct 24, 2018
1 parent 00cef19 commit 07438e6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libs/purifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ function load_purifier() {

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

Expand Down

0 comments on commit 07438e6

Please sign in to comment.