mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
MDL-37739 mod_wiki: Wiki ToC header href remove square double brackets.
When H1, H2 and H3 links in wiki act themselves as hyperlinks, they were displayed in double brackets. This patch removes [[ and ]] out of the table of content displayed header hyperlinks.
This commit is contained in:
parent
e8d5100212
commit
2c13bbba2b
@ -237,7 +237,9 @@ abstract class wiki_markup_parser extends generic_parser {
|
||||
$number .= ".$currentsection[2]";
|
||||
}
|
||||
}
|
||||
$toc .= parser_utils::h('p', $number . ". " . parser_utils::h('a', $header[1], array('href' => "#toc-$i")), array('class' => 'wiki-toc-section-' . $header[0] . " wiki-toc-section"));
|
||||
$toc .= parser_utils::h('p', $number . ". " .
|
||||
parser_utils::h('a', str_replace(array('[[', ']]'), '', $header[1]), array('href' => "#toc-$i")),
|
||||
array('class' => 'wiki-toc-section-' . $header[0] . " wiki-toc-section"));
|
||||
$i++;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user