]> git.mjollnir.org Git - moodle.git/commitdiff
Making the link title look a bit nicer for long strings with spaces etc
authormoodler <moodler>
Fri, 20 Feb 2004 04:14:24 +0000 (04:14 +0000)
committermoodler <moodler>
Fri, 20 Feb 2004 04:14:24 +0000 (04:14 +0000)
mod/glossary/dynalink.php

index b42571a4bd75169209650bac0d9a85aa11fb3a5a..9c694c880df98672b294227411fa856afa01084f 100644 (file)
                             $lastglossary = $glossary->id;
                         }
 
-                        $concepttitle = urlencode($concept->concept);
-                        $title = strip_tags("$glossary->name: $concepttitle");
-                        $href_tag_begin = "<a target=\"entry\" class=\"autolink\" title=\"$title\" href=\"$CFG->wwwroot/mod/glossary/showentry.php?courseid=$courseid&concept=$concepttitle\" ".
-                             "onClick=\"return openpopup('/mod/glossary/showentry.php?courseid=$courseid\&concept=$concepttitle', 'entry', 'menubar=0,location=0,scrollbars,resizable,width=600,height=450', 0);\">";
+                        $encodedconcept = urlencode($concept->concept);
+                        $title = str_replace('"', "'", strip_tags("$glossary->name: $concept->concept"));
+                        $href_tag_begin = "<a target=\"entry\" class=\"autolink\" title=\"$title\" href=\"$CFG->wwwroot/mod/glossary/showentry.php?courseid=$courseid&concept=$encodedconcept\" ".
+                             "onClick=\"return openpopup('/mod/glossary/showentry.php?courseid=$courseid\&concept=$encodedconcept', 'entry', 'menubar=0,location=0,scrollbars,resizable,width=600,height=450', 0);\">";
                     }
                     $replace = "\\[]'\"*()\?";
                     $currentconcept = glossary_addslashes($replace,$concept->concept);