urlencode() hook for correct parameter handling & XHTML.
Merged from MOODLE_18_STABLE
This commit is contained in:
@@ -1359,7 +1359,7 @@ global $CFG;
|
||||
if ( $hook == $alphabet[$i] and $hook) {
|
||||
echo "<b>$alphabet[$i]</b>";
|
||||
} else {
|
||||
echo "<a href=\"$CFG->wwwroot/mod/glossary/view.php?id=$cm->id&mode=$mode&hook=$alphabet[$i]&sortkey=$sortkey&sortorder=$sortorder\">$alphabet[$i]</a>";
|
||||
echo "<a href=\"$CFG->wwwroot/mod/glossary/view.php?id=$cm->id&mode=$mode&hook=".urlencode($alphabet[$i])."&sortkey=$sortkey&sortorder=$sortorder\">$alphabet[$i]</a>";
|
||||
}
|
||||
if ((int) ($i % $letters_by_line) != 0 or $i == 0) {
|
||||
echo ' | ';
|
||||
|
||||
@@ -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'));
|
||||
}
|
||||
|
||||
|
||||
@@ -252,7 +252,7 @@
|
||||
$printicon = '';
|
||||
if ( $isuserframe and $mode != 'search') {
|
||||
if (has_capability('mod/glossary:manageentries', $context) or $glossary->allowprintview) {
|
||||
$printicon = " <a title =\"". get_string("printerfriendly","glossary") ."\" target=\"printview\" href=\"print.php?id=$cm->id&mode=$mode&hook=$hook&sortkey=$sortkey&sortorder=$sortorder&offset=$offset\"><img class=\"icon\" src=\"print.gif\" alt=\"". get_string("printerfriendly","glossary") . "\" /></a>";
|
||||
$printicon = " <a title =\"". get_string("printerfriendly","glossary") ."\" target=\"printview\" href=\"print.php?id=$cm->id&mode=$mode&hook=".urlencode($hook)."&sortkey=$sortkey&sortorder=$sortorder&offset=$offset\"><img class=\"icon\" src=\"print.gif\" alt=\"". get_string("printerfriendly","glossary") . "\" /></a>";
|
||||
}
|
||||
}
|
||||
print_heading(format_string($glossary->name).$printicon);
|
||||
|
||||
Reference in New Issue
Block a user