From: Tim Starling Date: Sat, 22 Nov 2003 06:55:07 +0000 (+0000) Subject: Removed dodgy regex X-Git-Tag: 1.1.0~115 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=6fc5803ca80b76d6fc13d37b5dda78224510f911;p=lhc%2Fweb%2Fwiklou.git Removed dodgy regex --- diff --git a/includes/DatabaseFunctions.php b/includes/DatabaseFunctions.php index db24e258ae..e6bc40b6a5 100644 --- a/includes/DatabaseFunctions.php +++ b/includes/DatabaseFunctions.php @@ -207,7 +207,7 @@ function wfGeneralizeSQL( $sql ) { # This could be done faster with some arrays and a single preg_replace, # but this show more clearly what's going on. Which may be a good thing. - $sql = preg_replace ( "/'([^\\\\']|\\\\.)*'|\"([^\\\\\"]|\\\\.)*\"/", "'X'", $sql); + $sql = preg_replace( "/'.*?[^\\\\]'/", "'X'", $sql ); $sql = preg_replace ( "/-?\d+/" , "N", $sql); $sql = preg_replace ( "/\s+/", " ", $sql); return $sql;