Use prepare() instead of addslashes(). props wpmuguru.
git-svn-id: http://svn.automattic.com/wordpress/trunk@16643 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
bd0a73d083
commit
a0bc51f8d8
|
@ -1865,9 +1865,8 @@ function trackback($trackback_url, $title, $excerpt, $ID) {
|
|||
if ( is_wp_error( $response ) )
|
||||
return;
|
||||
|
||||
$tb_url = addslashes( $trackback_url );
|
||||
$wpdb->query( $wpdb->prepare("UPDATE $wpdb->posts SET pinged = CONCAT(pinged, '\n', '$tb_url') WHERE ID = %d", $ID) );
|
||||
return $wpdb->query( $wpdb->prepare("UPDATE $wpdb->posts SET to_ping = TRIM(REPLACE(to_ping, '$tb_url', '')) WHERE ID = %d", $ID) );
|
||||
$wpdb->query( $wpdb->prepare("UPDATE $wpdb->posts SET pinged = CONCAT(pinged, '\n', %s) WHERE ID = %d", $trackback_url, $ID) );
|
||||
return $wpdb->query( $wpdb->prepare("UPDATE $wpdb->posts SET to_ping = TRIM(REPLACE(to_ping, %s, '')) WHERE ID = %d", $trackback_url, $ID) );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue