MDL-29585 mod_wiki: Prevent broken links in editable sections
When a section name ended with a URL, the '<a' part of [edit] link that is appended to the section was considered as part of the URL in the section, thus causing the [edit] link to be broken.
This commit is contained in:
committed by
Dan Poltawski
parent
14605dc0fd
commit
83cfd8a37a
@@ -181,7 +181,9 @@ abstract class wiki_markup_parser extends generic_parser {
|
||||
$text = trim($text);
|
||||
|
||||
if (!$this->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) {
|
||||
|
||||
Reference in New Issue
Block a user