pingback_ping() function displays wrong content in pingback-display in some occurances
|Reported by:||webrocker||Owned by:||josephscott|
If the blog uses a template where the post-meta-data like the trackback-link and such is wrapped in a "div" tag but not in a "p" tag, the pingback will incorrectly display the content surrounding the meta-data-links, not the content of the pinging post.
if there is a "related posts" navigation on the page (possible with the ultimate-tag-warrior plugin), or any other links inside the page that link to other posts from the same blog (even the next post, previous post links), pingbacks will display the content around the first of these links, not the contents around the "pinging" link inside the post.
on line 1192 in xmlrpc.php:
$linea = preg_replace( “/ < (h1|h2|h3|h4|h5|h6|p|th|td|li|dt|dd|pre|caption|input|textarea|button|body)[^>]*>/”, “\n\n”, $linea );
the "div" tag is not recognized.
changing that to:
$linea = preg_replace( “/ < (h1|h2|h3|h4|h5|h6|p|th|td|li|dt|dd|pre|caption|input|textarea|button|body|div)[^>]*>/”, “\n\n”, $linea );
fixed the problems for my blog.
Frankly I'm not that "deep" into regular expressions to fully understand what's going on inside the pingback_ping() function - but after inserting "div" to the line above my pingbacks display the correct excerpt of the pinging post, which they failed to do before.
Change History (25)
- Component changed from Administration to XML-RPC
- Keywords pingback|xmlrpc.php|has added; pingback xmlrpc.php has removed
- Keywords reporter-feedback|pingback|xmlrpc.php|has added; pingback|xmlrpc.php|has removed
comment:6 foolswisdom — 8 years ago
- Keywords pingback|xmlrpc.php|has added; reporter-feedback|pingback|xmlrpc.php|has removed
comment:10 foolswisdom — 7 years ago
- Keywords pingback xmlrpc.php has-patch 2nd-opinion added; pingback|xmlrpc.php|has patch|2nd opinion removed
- Milestone changed from 2.2 to 2.3
- Resolution set to wontfix
- Status changed from new to closed
- Keywords needs-review added; 2nd-opinion removed
- Milestone set to 2.9
- Resolution wontfix deleted
- Status changed from closed to reopened
- Owner changed from anonymous to josephscott
- Status changed from reopened to assigned