From: stronk7 Date: Tue, 20 Mar 2007 00:11:55 +0000 (+0000) Subject: urlencode() hook for correct parameter handling & XHTML. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=82015ed26f438f80c387d2bcd7fe6b4baedb0e0b;p=moodle.git urlencode() hook for correct parameter handling & XHTML. Merged from MOODLE_18_STABLE --- diff --git a/mod/glossary/lib.php b/mod/glossary/lib.php index 394deeed32..b6661d04d4 100644 --- a/mod/glossary/lib.php +++ b/mod/glossary/lib.php @@ -1359,7 +1359,7 @@ global $CFG; if ( $hook == $alphabet[$i] and $hook) { echo "$alphabet[$i]"; } else { - echo "wwwroot/mod/glossary/view.php?id=$cm->id&mode=$mode&hook=$alphabet[$i]&sortkey=$sortkey&sortorder=$sortorder\">$alphabet[$i]"; + echo "wwwroot/mod/glossary/view.php?id=$cm->id&mode=$mode&hook=".urlencode($alphabet[$i])."&sortkey=$sortkey&sortorder=$sortorder\">$alphabet[$i]"; } if ((int) ($i % $letters_by_line) != 0 or $i == 0) { echo ' | '; diff --git a/mod/glossary/tabs.php b/mod/glossary/tabs.php index 8bc62c794f..e0afbe59b7 100644 --- a/mod/glossary/tabs.php +++ b/mod/glossary/tabs.php @@ -23,7 +23,7 @@ if (has_capability('mod/glossary:export', $context)) { $toolsrow[] = new tabobject(GLOSSARY_EXPORT_VIEW, $CFG->wwwroot.'/mod/glossary/export.php?id='.$cm->id. - '&mode='.$mode.'&hook='.$hook, + '&mode='.$mode.'&hook='.urlencode($hook), get_string('exportentries', 'glossary')); } diff --git a/mod/glossary/view.php b/mod/glossary/view.php index 0af92b45a8..fcfada0fa8 100644 --- a/mod/glossary/view.php +++ b/mod/glossary/view.php @@ -252,7 +252,7 @@ $printicon = ''; if ( $isuserframe and $mode != 'search') { if (has_capability('mod/glossary:manageentries', $context) or $glossary->allowprintview) { - $printicon = " id&mode=$mode&hook=$hook&sortkey=$sortkey&sortorder=$sortorder&offset=$offset\">\""."; + $printicon = " id&mode=$mode&hook=".urlencode($hook)."&sortkey=$sortkey&sortorder=$sortorder&offset=$offset\">\""."; } } print_heading(format_string($glossary->name).$printicon);