diff options
author | Andreas Gohr <andi@splitbrain.org> | 2005-09-22 18:17:23 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2005-09-22 18:17:23 +0200 |
commit | b034216d3aab746631aaad991cbe7165c78dd792 (patch) | |
tree | bdc078b24f3e5b8edb260d95f7125bd8aac893e4 | |
parent | a9cd1c6aa3775e9e863af253b3a00a66a9036a83 (diff) | |
download | rpg-b034216d3aab746631aaad991cbe7165c78dd792.tar.gz rpg-b034216d3aab746631aaad991cbe7165c78dd792.tar.bz2 |
do not encode # in interwiki links #529
darcs-hash:20050922161723-7ad00-d3b80451eaa7315a7e5fbb41008d03e8bbc0a991.gz
-rw-r--r-- | inc/parser/xhtml.php | 4 |
1 files changed, 4 insertions, 0 deletions
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']); |