Make sure generated links use & instead of & between GET vars.
authorstevetruckstuff <stevetruckstuff@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 5 Oct 2006 15:24:20 +0000 (15:24 +0000)
committerstevetruckstuff <stevetruckstuff@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 5 Oct 2006 15:24:20 +0000 (15:24 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@11835 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/html.php

index 4dc3f1e79d2d5e13ac3a4ae7175a42d023bb90d6..217ecfe022aba86e83bd01ef54f822a6fb8d27e6 100644 (file)
@@ -109,7 +109,7 @@ function set_url_var($url, $var, $val=0, $link=true) {
                     '/.+(\\?'.$var.')=(.*)$/AU',     /* at front and only var */
                     '/.+(\\&'.$var.')=(.*)$/AU'      /* at the end */
                     );
-    preg_replace('/&amp;/','&',$url);
+    $url = preg_replace('/&amp;/','&',$url);
 
     // FIXME: why switch is used instead of if () or one preg_match()
     switch (true) {
@@ -155,5 +155,6 @@ function set_url_var($url, $var, $val=0, $link=true) {
         $pat = "/$k=$v/";
         $url = preg_replace($pat,$rpl,$url);
     }
+    $url = preg_replace('/&/','&amp;',$url);
     return $url;
 }