From 3d5e07d9f0f7f71f91cd97f4a7484f4da8a1841a Mon Sep 17 00:00:00 2001 From: Adrian Lang <lang@cosmocode.de> Date: Wed, 23 Jun 2010 10:08:28 +0200 Subject: [PATCH] Do not parse URL params in internal links, just pass them through --- inc/parser/xhtml.php | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php index f9a33fef0..c8862eece 100644 --- a/inc/parser/xhtml.php +++ b/inc/parser/xhtml.php @@ -560,15 +560,11 @@ class Doku_Renderer_xhtml extends Doku_Renderer { global $conf; global $ID; - $params = array(); - - if (preg_match('/^([^?]*)\?([^?]+)$/', $id, $matches)) { - $id = $matches[1]; - preg_match_all('/(?<=[&^])([^=]+)=([^=]*)(?:&|$)/', $matches[2], - $matches, PREG_SET_ORDER); - foreach($matches as &$param) { - $params[$param[1]] = $param[2]; - } + $params = ''; + $parts = explode('?', $id, 2); + if (count($parts) === 2) { + $id = $parts[0]; + $params = $parts[1]; } // default name is based on $id as given -- GitLab