]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Debug/Babel.php
Merge pull request #10994 from nupplaphil/feat/module_constructor
[friendica.git] / src / Module / Debug / Babel.php
index 322b742fbe475d61dae68aa86505ff4a1c1cfc8c..c50bd08d74c4492010e9d9de796312ec6c63beef 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2020, Friendica
+ * @copyright Copyright (C) 2010-2021, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -35,7 +35,7 @@ use Friendica\Util\XML;
  */
 class Babel extends BaseModule
 {
-       public static function content(array $parameters = [])
+       public function content(): string
        {
                function visible_whitespace($s)
                {
@@ -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)'),