From b6c6979fa2bc2a54befe6a451579ce8ff5515445 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 21 Jan 2006 20:27:47 +0100 Subject: urlencode -> rawurlencode (related to #685) This changes nearly all occurences of urlencode to rawurlencode. The latter encodes spaces as %20 while the former uses a + sign. For the use in browser URLs %20 is the correct form. darcs-hash:20060121192747-7ad00-6563b77368a41f071609495c6a145982938a8301.gz --- inc/common.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'inc/common.php') diff --git a/inc/common.php b/inc/common.php index 8ad55efff..c943ffa3c 100644 --- a/inc/common.php +++ b/inc/common.php @@ -101,7 +101,7 @@ function buildURLparams($params){ if($amp) $url .= '&'; $url .= $key.'='; - $url .= urlencode($val); + $url .= rawurlencode($val); $amp = true; } return $url; @@ -232,7 +232,7 @@ function idfilter($id,$ue=true){ $id = strtr($id,':',';'); } if($ue){ - $id = urlencode($id); + $id = rawurlencode($id); $id = str_replace('%3A',':',$id); //keep as colon $id = str_replace('%2F','/',$id); //keep as slash } @@ -296,9 +296,9 @@ function ml($id='',$more='',$direct=true){ $xlink .= 'lib/exe/fetch.php'; if($more){ $xlink .= '?'.$more; - $xlink .= '&media='.urlencode($id); + $xlink .= '&media='.rawurlencode($id); }else{ - $xlink .= '?media='.urlencode($id); + $xlink .= '?media='.rawurlencode($id); } return $xlink; } -- cgit v1.2.3