From c9aa0b4588d80d645a3b9ad4293bb646b0f62feb Mon Sep 17 00:00:00 2001 From: stekkel Date: Tue, 6 Aug 2002 22:42:45 +0000 Subject: [PATCH] fix for amp; stuff git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@3258 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/html.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/functions/html.php b/functions/html.php index d4961734..246808e1 100644 --- a/functions/html.php +++ b/functions/html.php @@ -82,8 +82,6 @@ function set_url_var($url, $var, $val=0) { $k = ''; $ret = ''; - $url = trim(preg_replace('/&/','&',$url)); - $pat_a = array ( '/.+(\\&'.$var.')=(.*)\\&/AU', /* in the middle */ '/.+\\?('.$var.')=(.*\\&).+/AU', /* at front, more follow */ @@ -110,7 +108,7 @@ default: if ($val) { if (strpos($url,'?')) { - $url .= "&$var=$val"; + $url .= "&$var=$val"; } else { $url .= "?$var=$val"; } @@ -121,13 +119,14 @@ if ($k) { if ($val) { $rpl = "$k=$val"; + $rpl = preg_replace('/&/','&',$rpl); } else { $rpl = ''; } $pat = "/$k=$v/"; $url = preg_replace($pat,$rpl,$url); } - return preg_replace('/&/','&',$url); + return $url; } /* Temporary test function to proces template vars with formatting. -- 2.25.1