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/parser/xhtml.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'inc/parser') 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'].='&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']); -- cgit v1.2.3