From 6bc9463aa136db64d8393faf00bc6c6ba10dbd10 Mon Sep 17 00:00:00 2001 From: dilipbheda Date: Fri, 10 Jan 2025 10:59:18 +0530 Subject: [PATCH] add minor regex improvement --- src/wp-includes/functions.wp-scripts.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/functions.wp-scripts.php b/src/wp-includes/functions.wp-scripts.php index 572e7130cdfd0..f4a09c4309a85 100644 --- a/src/wp-includes/functions.wp-scripts.php +++ b/src/wp-includes/functions.wp-scripts.php @@ -141,7 +141,7 @@ function wp_add_inline_script( $handle, $data, $position = 'after' ) { ), '4.5.0' ); - $data = trim( preg_replace( '#]*>(.*?)|]*>#is', '$1', $data ) ); + $data = trim( preg_replace( '#]*>(.*)|]*>#is', '$1', $data ) ); } return wp_scripts()->add_inline_script( $handle, $data, $position );