Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
4.0.3
-
None
-
MOODLE_400_STABLE
Description
Internal links with an anchor are parsed, but not rendered correctly in Moodle Wiki, e.g.
[[Page#toc-1|Page]] |
A tiny patch in /mod/wiki/locallib.php:wiki_parser_link could fix this behavior:
$swid = $options['swid']; |
$anchor = (!empty($options['anchor']) ? "#" . urlencode($options['anchor']) : ""); |
|
if ($page = wiki_get_page_by_title($swid, $link)) { |
$parsedlink = array('content' => $link, 'url' => $CFG->wwwroot . '/mod/wiki/view.php?pageid=' . $page->id . $anchor, 'new' => false, 'link_info' => array('link' => $link, 'pageid' => $page->id, 'new' => false)); |