Move HTML purification to own method in Content\Text\HTML

This commit is contained in:
Hypolite Petovan 2021-03-14 13:40:32 -04:00
parent 5b8f7361ea
commit 93823ecef5
3 changed files with 69 additions and 26 deletions

View file

@ -180,9 +180,7 @@ class Babel extends BaseModule
'content' => $html
];
$config = \HTMLPurifier_Config::createDefault();
$HTMLPurifier = new \HTMLPurifier($config);
$purified = $HTMLPurifier->purify($html);
$purified = Text\HTML::purify($html);
$results[] = [
'title' => DI::l10n()->t('HTML Purified (raw)'),