From 6fc5803ca80b76d6fc13d37b5dda78224510f911 Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Sat, 22 Nov 2003 06:55:07 +0000 Subject: [PATCH] Removed dodgy regex --- includes/DatabaseFunctions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.20.1