From 1db061934835099afe7c7e371829ba0d2e2fd174 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Fri, 19 Sep 2025 12:22:23 +0000 Subject: [PATCH] General: Escape periods in regular expressions where the character is intended to match only a literal period. Props westonruter, mukesh27, johnbillion Fixes #63988 Built from https://develop.svn.wordpress.org/trunk@60783 git-svn-id: http://core.svn.wordpress.org/trunk@60119 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/admin-bar.php | 4 ++-- wp-includes/embed.php | 2 +- wp-includes/version.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/wp-includes/admin-bar.php b/wp-includes/admin-bar.php index 5fe00e9801..c129964da4 100644 --- a/wp-includes/admin-bar.php +++ b/wp-includes/admin-bar.php @@ -377,7 +377,7 @@ function wp_admin_bar_site_menu( $wp_admin_bar ) { $blogname = get_bloginfo( 'name' ); if ( ! $blogname ) { - $blogname = preg_replace( '#^(https?://)?(www.)?#', '', get_home_url() ); + $blogname = preg_replace( '#^(https?://)?(www\.)?#', '', get_home_url() ); } if ( is_network_admin() ) { @@ -698,7 +698,7 @@ function wp_admin_bar_my_sites_menu( $wp_admin_bar ) { $blogname = $blog->blogname; if ( ! $blogname ) { - $blogname = preg_replace( '#^(https?://)?(www.)?#', '', get_home_url() ); + $blogname = preg_replace( '#^(https?://)?(www\.)?#', '', get_home_url() ); } $menu_id = 'blog-' . $blog->userblog_id; diff --git a/wp-includes/embed.php b/wp-includes/embed.php index 6ef190d0ea..937dd6fb27 100644 --- a/wp-includes/embed.php +++ b/wp-includes/embed.php @@ -202,7 +202,7 @@ function wp_maybe_load_embeds() { return; } - wp_embed_register_handler( 'youtube_embed_url', '#https?://(www.)?youtube\.com/(?:v|embed)/([^/]+)#i', 'wp_embed_handler_youtube' ); + wp_embed_register_handler( 'youtube_embed_url', '#https?://(www\.)?youtube\.com/(?:v|embed)/([^/]+)#i', 'wp_embed_handler_youtube' ); /** * Filters the audio embed handler callback. diff --git a/wp-includes/version.php b/wp-includes/version.php index 1fab4e75fe..1b259d61c0 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.9-alpha-60782'; +$wp_version = '6.9-alpha-60783'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.