From 65f0227e21db7072148385d2675239b5819f5df3 Mon Sep 17 00:00:00 2001 From: Tetrakern <26898880+Tetrakern@users.noreply.github.com> Date: Mon, 28 Oct 2024 10:00:40 +0100 Subject: [PATCH] Temper fictioneer_see_some_evil() Still best function name. --- includes/functions/_setup-wordpress.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/functions/_setup-wordpress.php b/includes/functions/_setup-wordpress.php index 56772a71..8c7b24f3 100644 --- a/includes/functions/_setup-wordpress.php +++ b/includes/functions/_setup-wordpress.php @@ -1194,7 +1194,7 @@ function fictioneer_see_some_evil( $data, $postarr, $unsanitized_postarr ) { $results = []; // Check for JavaScript - $pattern = '/]*>.*?<\/script>|on[a-z]+=/si'; + $pattern = '/]*\bon[a-z]+=[^>]*>.*?<\/script>|]*>.*?<\/script>/si'; if ( preg_match_all( $pattern, $content, $matches ) ) { $results['js'] = $matches[0];