From ffe2292a8ff88d9f6beae777bc738067bbf4b5db Mon Sep 17 00:00:00 2001 From: Peter Westwood Date: Wed, 13 Mar 2013 16:00:38 +0000 Subject: [PATCH] Multisite: Ensure that get_blogaddress_by_name does not mangle blognames with leading digits. Correctly specify the backreference in the regular expression so that it can not become ambiguous when there is a leading digit on the blogname. Fixes #23689 props dllh. git-svn-id: http://core.svn.wordpress.org/trunk@23686 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/ms-blogs.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/ms-blogs.php b/wp-includes/ms-blogs.php index 19bea526a6..7761e9007a 100644 --- a/wp-includes/ms-blogs.php +++ b/wp-includes/ms-blogs.php @@ -48,7 +48,7 @@ function get_blogaddress_by_name( $blogname ) { $blogname = 'www'; $url = rtrim( network_home_url(), '/' ); if ( !empty( $blogname ) ) - $url = preg_replace( '|^([^\.]+://)|', '$1' . $blogname . '.', $url ); + $url = preg_replace( '|^([^\.]+://)|', "\${1}" . $blogname . '.', $url ); } else { $url = network_home_url( $blogname ); }