urlencode() hook for correct parameter handling & XHTML.

Merged from MOODLE_18_STABLE
This commit is contained in:
stronk7
2007-03-20 00:11:55 +00:00
parent c0cdb3b314
commit 82015ed26f
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -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&amp;mode=$mode&amp;hook=$alphabet[$i]&amp;sortkey=$sortkey&amp;sortorder=$sortorder\">$alphabet[$i]</a>";
echo "<a href=\"$CFG->wwwroot/mod/glossary/view.php?id=$cm->id&amp;mode=$mode&amp;hook=".urlencode($alphabet[$i])."&amp;sortkey=$sortkey&amp;sortorder=$sortorder\">$alphabet[$i]</a>";
}
if ((int) ($i % $letters_by_line) != 0 or $i == 0) {
echo ' | ';
+1 -1
View File
@@ -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.
'&amp;mode='.$mode.'&amp;hook='.$hook,
'&amp;mode='.$mode.'&amp;hook='.urlencode($hook),
get_string('exportentries', 'glossary'));
}
+1 -1
View File
@@ -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&amp;mode=$mode&amp;hook=$hook&amp;sortkey=$sortkey&amp;sortorder=$sortorder&amp;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&amp;mode=$mode&amp;hook=".urlencode($hook)."&amp;sortkey=$sortkey&amp;sortorder=$sortorder&amp;offset=$offset\"><img class=\"icon\" src=\"print.gif\" alt=\"". get_string("printerfriendly","glossary") . "\" /></a>";
}
}
print_heading(format_string($glossary->name).$printicon);