From 6843183228e4016026d16cef81dd7a67aa821ad8 Mon Sep 17 00:00:00 2001 From: ryan 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: http://svn.automattic.com/wordpress/trunk@11024 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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 86080d677..d9de8279d 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; }