Don't quote escaped strings. Props dd32. see #11608
git-svn-id: http://svn.automattic.com/wordpress/trunk@13357 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
fc250d46f3
commit
efe8a967be
|
@ -864,7 +864,7 @@ class wpdb {
|
|||
$args = $args[0];
|
||||
$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
|
||||
$query = preg_replace('|(?<!%)%s|', "'%s'", $query); // quote the strings, avoiding escaped strings like %%s
|
||||
array_walk( $args, array( &$this, 'escape_by_ref' ) );
|
||||
return @vsprintf( $query, $args );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue