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];