From 48acc8af35b7b52e94d89503ecbaa6c7664b340e Mon Sep 17 00:00:00 2001 From: stevetruckstuff Date: Thu, 5 Oct 2006 15:24:20 +0000 Subject: [PATCH] Make sure generated links use & instead of & between GET vars. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@11835 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/html.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/functions/html.php b/functions/html.php index 4dc3f1e7..217ecfe0 100644 --- a/functions/html.php +++ b/functions/html.php @@ -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('/&/','&',$url); + $url = preg_replace('/&/','&',$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('/&/','&',$url); return $url; } -- 2.25.1