From af2d2e6bfa085f00e4ab5a5e8e2f996d4f04cb59 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Mon, 20 Apr 2009 22:15:14 +0000 Subject: [PATCH] Eliminate unecessary preg_replace. Props bernzilla, Denis-de-Bernardy. fixes #5624 git-svn-id: https://develop.svn.wordpress.org/trunk@11024 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/functions.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 86080d677d..d9de8279d4 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -934,9 +934,7 @@ function make_url_footnote( $content ) { function xmlrpc_getposttitle( $content ) { global $post_default_title; if ( preg_match( '/(.+?)<\/title>/is', $content, $matchtitle ) ) { - $post_title = $matchtitle[0]; - $post_title = preg_replace( '/<title>/si', '', $post_title ); - $post_title = preg_replace( '/<\/title>/si', '', $post_title ); + $post_title = $matchtitle[1]; } else { $post_title = $post_default_title; }