Skip to content
Permalink
Browse files Browse the repository at this point in the history
quickfix for dokuwiki links
  • Loading branch information
peterdd committed Sep 12, 2017
1 parent c299979 commit 00cfae5
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions plugins/dokuwiki/lib/plugins/changelinks/syntax.php
Expand Up @@ -130,8 +130,15 @@ function render($mode, &$renderer, $data) {
$link['more'] = '';
$link['class'] = 'internallink';
$link['url'] = DOKU_INTERNAL_LINK . $id;
$link['name'] = ($name) ? $name : $id;
$link['title'] = ($name) ? $name : $id;

if(is_array($name)){
$link['name'] = (isset($name['title'])) ? hsc($name['title']) : hsc($id);
$link['title'] = $id;
} else{
$link['name'] = ($name) ? hsc($name) : hsc($id);
$link['title'] = ($name) ? $name : $id;
}

//add search string
if($search){
($conf['userewrite']) ? $link['url'].='?s=' : $link['url'].='&s=';
Expand All @@ -147,4 +154,4 @@ function render($mode, &$renderer, $data) {
}

//Setup VIM: ex: et ts=4 enc=utf-8 :
?>
?>

0 comments on commit 00cfae5

Please sign in to comment.