mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
addslashes to string used for javascript link
This commit is contained in:
parent
8a205861e0
commit
ef49e5c301
@ -245,7 +245,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\") >$linkname</A>');";
|
||||
echo "\ndocument.write('<A TITLE=\"$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";
|
||||
|
Loading…
x
Reference in New Issue
Block a user