]> git.mjollnir.org Git - moodle.git/commitdiff
Add slashes to title to avoid errors with quotes - see bug 479
authormoodler <moodler>
Mon, 2 Jun 2003 16:16:02 +0000 (16:16 +0000)
committermoodler <moodler>
Mon, 2 Jun 2003 16:16:02 +0000 (16:16 +0000)
lib/weblib.php

index e29612b51257e245c2a2cf914778d02e14958d23..e23559dd0bd7415d95f297642c6f175490f1ef20 100644 (file)
@@ -257,7 +257,7 @@ function link_to_popup_window ($url, $name="popup", $linkname="click here", $hei
 
     echo "\n<script language=\"javascript\">";
     echo "\n<!--";
-    echo "\ndocument.write('<a title=\"$title\" href=javascript:openpopup(\"$url\",\"$name\",\"$height\",\"$width\") >".addslashes($linkname)."</A>');";
+    echo "\ndocument.write('<a title=\"".addslashes($title)."\" href=javascript:openpopup(\"$url\",\"$name\",\"$height\",\"$width\") >".addslashes($linkname)."</a>');";
     echo "\n//-->";
     echo "\n</script>";
     echo "\n<noscript>\n<a target=\"$name\" title=\"$title\" href=\"$CFG->wwwroot/$url\">$linkname</a>\n</noscript>\n";