summaryrefslogtreecommitdiff
path: root/inc/common.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2006-01-21 20:27:47 +0100
committerAndreas Gohr <andi@splitbrain.org>2006-01-21 20:27:47 +0100
commitb6c6979fa2bc2a54befe6a451579ce8ff5515445 (patch)
tree5db8c38749c2bc5d49d91cfbe2cf1072ae470d23 /inc/common.php
parent474767f47cac6e7fe6c19f5838f5b1e7ded1f9ae (diff)
downloadrpg-b6c6979fa2bc2a54befe6a451579ce8ff5515445.tar.gz
rpg-b6c6979fa2bc2a54befe6a451579ce8ff5515445.tar.bz2
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
Diffstat (limited to 'inc/common.php')
-rw-r--r--inc/common.php8
1 files changed, 4 insertions, 4 deletions
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 .= '&amp;';
$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 .= '&amp;media='.urlencode($id);
+ $xlink .= '&amp;media='.rawurlencode($id);
}else{
- $xlink .= '?media='.urlencode($id);
+ $xlink .= '?media='.rawurlencode($id);
}
return $xlink;
}