summaryrefslogtreecommitdiff
path: root/inc/parser
diff options
context:
space:
mode:
authorKate Arzamastseva <pshns@ukr.net>2011-04-18 17:00:40 +0300
committerKate Arzamastseva <pshns@ukr.net>2011-04-18 17:00:40 +0300
commitf493983cbddc6c8c387a76bf3f6631853485162b (patch)
tree38cc53f0b287fde2a1b4426faa8a6fff1e56d769 /inc/parser
parent058f1c3e98b1437a691cc77a36002dee1c41f007 (diff)
parent342e58c8c048bfd5f57f10bd88cee95aa2732e96 (diff)
downloadrpg-f493983cbddc6c8c387a76bf3f6631853485162b.tar.gz
rpg-f493983cbddc6c8c387a76bf3f6631853485162b.tar.bz2
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'inc/parser')
-rw-r--r--inc/parser/parser.php2
-rw-r--r--inc/parser/xhtml.php9
2 files changed, 10 insertions, 1 deletions
diff --git a/inc/parser/parser.php b/inc/parser/parser.php
index e47ce56fa..68d4e4569 100644
--- a/inc/parser/parser.php
+++ b/inc/parser/parser.php
@@ -828,7 +828,7 @@ class Doku_Parser_Mode_internallink extends Doku_Parser_Mode {
function connectTo($mode) {
// Word boundaries?
- $this->Lexer->addSpecialPattern("\[\[(?:(?:[^[\]]*?\[.*?\])|.+?)\]\]",$mode,'internallink');
+ $this->Lexer->addSpecialPattern("\[\[(?:(?:[^[\]]*?\[.*?\])|.*?)\]\]",$mode,'internallink');
}
function getSort() {
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 ) {