]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 458189: Quicksearches starting with +DUP return no results - Patch by FrédÃ...
authorlpsolit%gmail.com <>
Fri, 10 Oct 2008 22:44:46 +0000 (22:44 +0000)
committerlpsolit%gmail.com <>
Fri, 10 Oct 2008 22:44:46 +0000 (22:44 +0000)
Bugzilla/Search/Quicksearch.pm

index df54952d55e7df3e3d7c6e150c9faf0a19450f2a..a56ae1637c5674fef50f0bfa4f9a9f1d7dfdaed4 100644 (file)
@@ -446,12 +446,14 @@ sub splitString {
     # Now split on unescaped whitespace
     @parts = split(/\s+/, $string);
     foreach (@parts) {
+        # Protect plus signs from becoming a blank.
+        # If "+" appears as the first character, leave it alone
+        # as it has a special meaning. Strings which start with
+        # "+" must be quoted.
+        s/(?<!^)\+/%2B/g;
         # Remove quotes
         s/"//g;
-        # Protect plus signs from becoming a blank
-        s/\+/%2B/g;
     }
-                        
     return @parts;
 }