]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Debug/Babel.php
Merge branch '2023.03-rc' into stable
[friendica.git] / src / Module / Debug / Babel.php
index 322b742fbe475d61dae68aa86505ff4a1c1cfc8c..560d002a1b85c93791b64f0599315a5a6e5a977e 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2020, Friendica
+ * @copyright Copyright (C) 2010-2023, 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 = [])
+       protected function content(array $request = []): 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)'),
@@ -292,7 +290,7 @@ class Babel extends BaseModule
                                                ];
                                        } else {
                                                $results[] = [
-                                                       'title'   => DI::l10n()->t('Error'),
+                                                       'title'   => DI::l10n()->tt('Error', 'Errors', 1),
                                                        'content' => DI::l10n()->t('Twitter addon is absent from the addon/ folder.'),
                                                ];
                                        }