strip slashes before preparing to avoid double escaping

git-svn-id: https://develop.svn.wordpress.org/trunk@9105 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2008-10-09 00:19:11 +00:00
parent 7a05a094f0
commit 680d9c369f

View File

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