Index: branches/5.0.x/core/kernel/db/db_connection.php =================================================================== diff -u -r12734 -r12896 --- branches/5.0.x/core/kernel/db/db_connection.php (.../db_connection.php) (revision 12734) +++ branches/5.0.x/core/kernel/db/db_connection.php (.../db_connection.php) (revision 12896) @@ -1,6 +1,6 @@ connectionID); + $string = mysql_real_escape_string($string, $this->connectionID); + + // prevent double-escaping of MySQL wildcard symbols ("%" and "_") in case if they were already escaped + return str_replace(Array ('\\\\%', '\\\\_'), Array ('\\%', '\\_'), $string); } /**