From 414f7ef8ff10277d8f1e787b61ac0bebd324caa3 Mon Sep 17 00:00:00 2001 From: Frederic Massart Date: Wed, 19 Nov 2014 17:24:38 +0800 Subject: [PATCH] MDL-29585 mod_wiki: Prevent broken links in editable sections When a section name ended with a URL, the 'pretty_print && $level == 1) { - $text .= parser_utils::h('a', '['.get_string('editsection', 'wiki').']', array('href' => "edit.php?pageid={$this->wiki_page_id}§ion=" . urlencode($text), 'class' => 'wiki_edit_section')); + $text .= ' ' . parser_utils::h('a', '['.get_string('editsection', 'wiki').']', + array('href' => "edit.php?pageid={$this->wiki_page_id}§ion=" . urlencode($text), + 'class' => 'wiki_edit_section')); } if ($level <= $this->maxheaderdepth) {