]> git.mjollnir.org Git - moodle.git/commitdiff
urlencode() hook for correct parameter handling & XHTML.
authorstronk7 <stronk7>
Tue, 20 Mar 2007 00:11:55 +0000 (00:11 +0000)
committerstronk7 <stronk7>
Tue, 20 Mar 2007 00:11:55 +0000 (00:11 +0000)
Merged from MOODLE_18_STABLE

mod/glossary/lib.php
mod/glossary/tabs.php
mod/glossary/view.php

index 394deeed32e0a9215f6c86801d8aa0d2da54e29f..b6661d04d4d13d489bea3e6293c8b174f106554b 100644 (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 ' | ';
index 8bc62c794f91426cd9e21919d1c6c8e3fc5ca527..e0afbe59b7459fb13804990552071aa663d85b1f 100644 (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'));
     }
 
index 0af92b45a8cc5fb832f1932b9361ced919267016..fcfada0fa8afecf1d741cd3d879ebf65461f81d1 100644 (file)
     $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);