Don't assume that url parameters have an equal sign.
authorJan Schneider <jan@horde.org>
Wed, 3 Mar 2010 11:04:23 +0000 (12:04 +0100)
committerJan Schneider <jan@horde.org>
Wed, 3 Mar 2010 11:04:23 +0000 (12:04 +0100)
framework/Url/lib/Horde/Url.php

index f028f71..9652dff 100644 (file)
@@ -80,12 +80,12 @@ class Horde_Url
 
             /* Check if the argument separator has been already
              * htmlentities-ized in the URL. */
-            if (preg_match('/=.*?&amp;.*?=/', $query)) {
+            if (preg_match('/&amp;/', $query)) {
                 $query = html_entity_decode($query);
                 if (is_null($raw)) {
                     $raw = false;
                 }
-            } elseif (preg_match('/=.*?&.*?=/', $query)) {
+            } elseif (preg_match('/&/', $query)) {
                 if (is_null($raw)) {
                     $raw = true;
                 }