Add htmlspecialchars to project title output on winners page to prevent XSS attacks

This commit is contained in:
james 2013-03-10 21:28:31 +00:00
parent 529491456c
commit f4e0048df8

View File

@ -151,7 +151,7 @@ if($_GET['year'] && $_GET['type']) {
if($pr->projectnumber)
{
echo "&nbsp   ";
echo "($pr->projectnumber) $pr->title";
echo "($pr->projectnumber) ".htmlspecialchars($pr->title);
$sq=mysql_query("SELECT students.firstname,
students.lastname,
@ -198,9 +198,9 @@ if($_GET['year'] && $_GET['type']) {
echo "&nbsp   ";
echo "&nbsp   ";
if($studnum > 1)
echo i18n("Students").": $students";
echo i18n("Students").": ".htmlspecialchars($students);
else
echo i18n("Student").": $students";
echo i18n("Student").": ".htmlspecialchars($students);
echo "<br />";
echo "&nbsp&nbsp;&nbsp;&nbsp;";