strip slashes before preparing to avoid double escaping

git-svn-id: http://svn.automattic.com/wordpress/trunk@9105 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-10-09 00:19:11 +00:00
parent ac5bbe268f
commit cd7ea183e7
1 changed files with 4 additions and 0 deletions

View File

@ -377,6 +377,10 @@ function get_post_to_edit( $id ) {
function post_exists($title, $content = '', $post_date = '') { function post_exists($title, $content = '', $post_date = '') {
global $wpdb; global $wpdb;
$title = stripslashes($title);
$content = stripslashes($content);
$post_date = stripslashes($post_date);
if (!empty ($post_date)) if (!empty ($post_date))
$post_date = $wpdb->prepare("AND post_date = %s", $post_date); $post_date = $wpdb->prepare("AND post_date = %s", $post_date);