summaryrefslogtreecommitdiff
path: root/inc/parser
diff options
context:
space:
mode:
authorIzidor Matušov <izidor.matusov@gmail.com>2011-04-07 19:44:54 +0200
committerMichael Hamann <michael@content-space.de>2011-04-08 00:36:11 +0200
commitfda14ffc7c57c4451df9196e8125cd39b1d5c134 (patch)
treeb222bb8affa67530d2df25fe280ae30e2421371f /inc/parser
parent38574c3529746542183c68d28c6ad6fc1de2d6dd (diff)
downloadrpg-fda14ffc7c57c4451df9196e8125cd39b1d5c134.tar.gz
rpg-fda14ffc7c57c4451df9196e8125cd39b1d5c134.tar.bz2
Check if link exists and set right caption
Diffstat (limited to 'inc/parser')
-rw-r--r--inc/parser/xhtml.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php
index 9405d9420..ab295dd01 100644
--- a/inc/parser/xhtml.php
+++ b/inc/parser/xhtml.php
@@ -574,11 +574,20 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
$params = $parts[1];
}
+ // For empty $id we need to know the current $ID
+ // We need this check because _simpleTitle needs
+ // correct $id and resolve_pageid() use cleanID($id)
+ // (some things could be lost)
+ if ($id === '') {
+ $id = $ID;
+ }
+
// default name is based on $id as given
$default = $this->_simpleTitle($id);
// now first resolve and clean up the $id
resolve_pageid(getNS($ID),$id,$exists);
+
$name = $this->_getLinkTitle($name, $default, $isImage, $id, $linktype);
if ( !$isImage ) {
if ( $exists ) {