diff --git a/classes/context/Context.class.php b/classes/context/Context.class.php index 0c9f71190..a24ed24e3 100644 --- a/classes/context/Context.class.php +++ b/classes/context/Context.class.php @@ -139,7 +139,7 @@ class Context */ private static $_check_patterns = array( '@<(?:\?|%)@' => 'DENY ALL', - '@ 'DENY ALL', + '@ 'DENY ALL', '@ 'ALLOW ADMIN ONLY', ); diff --git a/modules/admin/models/Utility.php b/modules/admin/models/Utility.php index d0c8edd56..b14202981 100644 --- a/modules/admin/models/Utility.php +++ b/modules/admin/models/Utility.php @@ -13,7 +13,10 @@ class Utility public static function cleanHeaderAndFooterScripts(string $content) { $content = utf8_clean($content); - $content = preg_replace('!]*>!', '', $content); + $content = preg_replace('!]*>!i', '', $content); + $content = preg_replace_callback('!]*?)language=[\'"]javascript[\'"]!i', function ($matches) { + return trim('