Improve pingback text extraction by stopping at a closing block-level tag. props Otto42. see #21914.

git-svn-id: https://develop.svn.wordpress.org/trunk@22152 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2012-10-09 23:56:32 +00:00
parent 2a4e10733e
commit 0485636388
1 changed files with 1 additions and 1 deletions

View File

@ -5443,7 +5443,7 @@ class wp_xmlrpc_server extends IXR_Server {
// Work around bug in strip_tags():
$linea = str_replace('<!DOC', '<DOC', $linea);
$linea = preg_replace( '/[\s\r\n\t]+/', ' ', $linea ); // normalize spaces
$linea = preg_replace( "/ <(h1|h2|h3|h4|h5|h6|p|th|td|li|dt|dd|pre|caption|input|textarea|button|body)[^>]*>/", "\n\n", $linea );
$linea = preg_replace( "/<\/*(h1|h2|h3|h4|h5|h6|p|th|td|li|dt|dd|pre|caption|input|textarea|button|body)[^>]*>/", "\n\n", $linea );
preg_match('|<title>([^<]*?)</title>|is', $linea, $matchtitle);
$title = $matchtitle[1];