Skip to content

Commit fb02135

Browse files
committed
drop tilde from title. fixes dokuwiki#4347
When a link with the page relative shortcut is used and no title is given, the given ID is used to create a title. In this case, the tilde should be removed from the title. [[~SomeThing]] -> SomeThing
1 parent b327c21 commit fb02135

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

inc/parser/renderer.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -891,6 +891,9 @@ public function _simpleTitle($name)
891891
{
892892
global $conf;
893893

894+
// remove relative namespace
895+
$name = ltrim($name, '~');
896+
894897
//if there is a hash we use the ancor name only
895898
[$name, $hash] = sexplode('#', $name, 2);
896899
if ($hash) return $hash;

0 commit comments

Comments
 (0)