From b034216d3aab746631aaad991cbe7165c78dd792 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Thu, 22 Sep 2005 18:17:23 +0200 Subject: do not encode # in interwiki links #529 darcs-hash:20050922161723-7ad00-d3b80451eaa7315a7e5fbb41008d03e8bbc0a991.gz --- inc/parser/xhtml.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'inc/parser') diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php index 7c7370943..fb833cc4e 100644 --- a/inc/parser/xhtml.php +++ b/inc/parser/xhtml.php @@ -597,6 +597,9 @@ class Doku_Renderer_xhtml extends Doku_Renderer { $link['target'] = $conf['target']['wiki']; } + //split into hash and url part + list($wikiUri,$hash) = explode('#',$wikiUri,2); + //replace placeholder if(preg_match('#\{(URL|NAME|SCHEME|HOST|PORT|PATH|QUERY)\}#',$url)){ //use placeholders @@ -614,6 +617,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer { //default $link['url'] = $url.urlencode($wikiUri); } + if($hash) $link['url'] .= '#'.urlencode($hash); $link['title'] = htmlspecialchars($link['url']); -- cgit v1.2.3