From bd75df9d1e5c421d1af4807a51f73c607a291fbf Mon Sep 17 00:00:00 2001 From: Mark Jaquith Date: Mon, 9 Jul 2007 17:55:32 +0000 Subject: [PATCH] Undo pre-doublequoting in prepare(). Props JeremyVisser. see #4553 git-svn-id: https://develop.svn.wordpress.org/trunk@5791 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/wp-db.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-includes/wp-db.php b/wp-includes/wp-db.php index 6b729a0057..5317dbde55 100644 --- a/wp-includes/wp-db.php +++ b/wp-includes/wp-db.php @@ -132,7 +132,8 @@ class wpdb { return; $args = func_get_args(); $query = array_shift($args); - $query = str_replace("'%s'", '%s', $query); // in case someone mistakenly already quoted it + $query = str_replace("'%s'", '%s', $query); // in case someone mistakenly already singlequoted it + $query = str_replace('"%s"', '%s', $query); // doublequote unquoting $query = str_replace('%s', "'%s'", $query); // quote the strings array_walk($args, array(&$this, 'escape_by_ref')); return @vsprintf($query, $args);