WordPress.org

Make WordPress Core

Changeset 22152


Ignore:
Timestamp:
10/09/12 23:56:32 (4 years ago)
Author:
nacin
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/class-wp-xmlrpc-server.php

    r22134 r22152  
    54445444        $linea = str_replace('<!DOC', '<DOC', $linea); 
    54455445        $linea = preg_replace( '/[\s\r\n\t]+/', ' ', $linea ); // normalize spaces 
    5446         $linea = preg_replace( "/ <(h1|h2|h3|h4|h5|h6|p|th|td|li|dt|dd|pre|caption|input|textarea|button|body)[^>]*>/", "\n\n", $linea ); 
     5446        $linea = preg_replace( "/<\/*(h1|h2|h3|h4|h5|h6|p|th|td|li|dt|dd|pre|caption|input|textarea|button|body)[^>]*>/", "\n\n", $linea ); 
    54475447 
    54485448        preg_match('|<title>([^<]*?)</title>|is', $linea, $matchtitle); 
Note: See TracChangeset for help on using the changeset viewer.