summaryrefslogtreecommitdiff
path: root/inc/parser
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/parser
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/parser')
-rw-r--r--inc/parser/xhtml.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php
index d03939542..9fd31f3b2 100644
--- a/inc/parser/xhtml.php
+++ b/inc/parser/xhtml.php
@@ -510,7 +510,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
//add search string
if($search){
($conf['userewrite']) ? $link['url'].='?s=' : $link['url'].='&amp;s=';
- $link['url'] .= urlencode($search);
+ $link['url'] .= rawurlencode($search);
}
//keep hash
@@ -594,7 +594,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
//replace placeholder
if(preg_match('#\{(URL|NAME|SCHEME|HOST|PORT|PATH|QUERY)\}#',$url)){
//use placeholders
- $url = str_replace('{URL}',urlencode($wikiUri),$url);
+ $url = str_replace('{URL}',rawurlencode($wikiUri),$url);
$url = str_replace('{NAME}',$wikiUri,$url);
$parsed = parse_url($wikiUri);
if(!$parsed['port']) $parsed['port'] = 80;
@@ -606,9 +606,9 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
$link['url'] = $url;
}else{
//default
- $link['url'] = $url.urlencode($wikiUri);
+ $link['url'] = $url.rawurlencode($wikiUri);
}
- if($hash) $link['url'] .= '#'.urlencode($hash);
+ if($hash) $link['url'] .= '#'.rawurlencode($hash);
$link['title'] = htmlspecialchars($link['url']);