summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
authorMichael Hamann <michael@content-space.de>2013-08-17 21:33:32 +0200
committerMichael Hamann <michael@content-space.de>2013-08-17 21:44:25 +0200
commit66d935e75f9ebbb37332c14e0a9425170c7c9330 (patch)
treed3216a06bc70f8ab0cf25cb2b3997a83fb638d97 /inc
parent9148a9640449434d985796b2a456153b72d090f4 (diff)
downloadrpg-66d935e75f9ebbb37332c14e0a9425170c7c9330.tar.gz
rpg-66d935e75f9ebbb37332c14e0a9425170c7c9330.tar.bz2
Fix backlinks for internal links with parameters
This adds the parameter extraction code from the xhtml renderer to the metadata renderer in order to not to include the parameters in the id that is recorded as link target. A test case checks that the link is actually returned as backlink (fails without the fix).
Diffstat (limited to 'inc')
-rw-r--r--inc/parser/metadata.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/inc/parser/metadata.php b/inc/parser/metadata.php
index d64fe4d77..7d186e069 100644
--- a/inc/parser/metadata.php
+++ b/inc/parser/metadata.php
@@ -287,6 +287,12 @@ class Doku_Renderer_metadata extends Doku_Renderer {
if ($name['type'] == 'internalmedia') $this->_recordMediaUsage($name['src']);
}
+ $parts = explode('?', $id, 2);
+ if (count($parts) === 2) {
+ $id = $parts[0];
+ }
+
+
$default = $this->_simpleTitle($id);
// first resolve and clean up the $id