summaryrefslogtreecommitdiff
path: root/inc/parser/xhtml.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/parser/xhtml.php')
-rw-r--r--inc/parser/xhtml.php14
1 files changed, 13 insertions, 1 deletions
diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php
index 176411c75..0ee04e5a1 100644
--- a/inc/parser/xhtml.php
+++ b/inc/parser/xhtml.php
@@ -559,6 +559,18 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
function internallink($id, $name = NULL, $search=NULL,$returnonly=false,$linktype='content') {
global $conf;
global $ID;
+
+ $params = array();
+
+ if (preg_match('/^([^?]*)\?([^?]+)$/', $id, $matches) !== false) {
+ $id = $matches[1];
+ preg_match_all('/(?<=[&^])([^=]+)=([^=]*)(?:&|$)/', $matches[2],
+ $matches, PREG_SET_ORDER);
+ foreach($matches as &$param) {
+ $params[$param[1]] = $param[2];
+ }
+ }
+
// default name is based on $id as given
$default = $this->_simpleTitle($id);
@@ -592,7 +604,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
}
$link['more'] = '';
$link['class'] = $class;
- $link['url'] = wl($id);
+ $link['url'] = wl($id, $params);
$link['name'] = $name;
$link['title'] = $id;
//add search string