MDL-28725 wiki: added urlencode around the section variable when it is being used to construct URLs
This commit is contained in:
@@ -477,7 +477,7 @@ class page_wiki_edit extends page_wiki {
|
||||
$params = 'pageid=' . $this->page->id;
|
||||
|
||||
if ($this->section) {
|
||||
$params .= '§ion=' . $this->section;
|
||||
$params .= '§ion=' . urlencode($this->section);
|
||||
}
|
||||
|
||||
$form = '<form method="post" action="' . $CFG->wwwroot . '/mod/wiki/overridelocks.php?' . $params . '">';
|
||||
@@ -523,7 +523,7 @@ class page_wiki_edit extends page_wiki {
|
||||
|
||||
$url = $CFG->wwwroot . '/mod/wiki/edit.php?pageid=' . $this->page->id;
|
||||
if (!empty($this->section)) {
|
||||
$url .= "§ion=" . $this->section;
|
||||
$url .= "§ion=" . urlencode($this->section);
|
||||
}
|
||||
|
||||
$params = array('attachmentoptions' => page_wiki_edit::$attachmentoptions, 'format' => $version->contentformat, 'version' => $versionnumber, 'pagetitle'=>$this->page->title);
|
||||
@@ -990,7 +990,7 @@ class page_wiki_preview extends page_wiki_edit {
|
||||
|
||||
$url = $CFG->wwwroot . '/mod/wiki/edit.php?pageid=' . $this->page->id;
|
||||
if (!empty($this->section)) {
|
||||
$url .= "§ion=" . $this->section;
|
||||
$url .= "§ion=" . urlencode($this->section);
|
||||
}
|
||||
$params = array('attachmentoptions' => page_wiki_edit::$attachmentoptions, 'format' => $this->format, 'version' => $this->versionnumber);
|
||||
|
||||
@@ -1980,7 +1980,7 @@ class page_wiki_save extends page_wiki_edit {
|
||||
|
||||
$url = $CFG->wwwroot . '/mod/wiki/edit.php?pageid=' . $this->page->id;
|
||||
if (!empty($this->section)) {
|
||||
$url .= "§ion=" . $this->section;
|
||||
$url .= "§ion=" . urlencode($this->section);
|
||||
}
|
||||
|
||||
$params = array('attachmentoptions' => page_wiki_edit::$attachmentoptions, 'format' => $this->format, 'version' => $this->versionnumber);
|
||||
@@ -2305,7 +2305,7 @@ class page_wiki_overridelocks extends page_wiki_edit {
|
||||
$args = "pageid=" . $this->page->id;
|
||||
|
||||
if (!empty($this->section)) {
|
||||
$args .= "§ion=" . $this->section;
|
||||
$args .= "§ion=" . urlencode($this->section);
|
||||
}
|
||||
|
||||
redirect($CFG->wwwroot . '/mod/wiki/edit.php?' . $args, get_string('overridinglocks', 'wiki'), 2);
|
||||
@@ -2334,7 +2334,7 @@ class page_wiki_overridelocks extends page_wiki_edit {
|
||||
$args = "pageid=" . $this->page->id;
|
||||
|
||||
if (!empty($this->section)) {
|
||||
$args .= "§ion=" . $this->section;
|
||||
$args .= "§ion=" . urlencode($this->section);
|
||||
}
|
||||
|
||||
redirect($CFG->wwwroot . '/mod/wiki/edit.php?' . $args, get_string('overridinglocks', 'wiki'), 2);
|
||||
|
||||
Reference in New Issue
Block a user