add encoding to htmlspecialchars

This commit is contained in:
james 2019-03-07 21:33:42 +00:00
parent ff169e7f39
commit 01ea27a39f

View File

@ -235,7 +235,7 @@ function countwords()
<input type="hidden" name="id" value="<?=$projectinfo->id?>">
<table>
<tr> <td><?=i18n("Project Title")?>: </td>
<td><input type="text" name="title" size="50" value="<?=htmlspecialchars($projectinfo->title)?>" /><?=REQUIREDFIELD?>
<td><input type="text" name="title" size="50" value="<?=htmlspecialchars($projectinfo->title,null,"ISO8859-1")?>" /><?=REQUIREDFIELD?>
<?
if($config['participant_project_title_charmax'])
echo i18n("(Max %1 characters)",array($config['participant_project_title_charmax']));
@ -267,7 +267,7 @@ if($config['project_type'] == 'yes'){
{
$sel="";
}
echo "<option $sel value=\"$r->type\">".htmlspecialchars(i18n($r->type))."</option>\n";
echo "<option $sel value=\"$r->type\">".htmlspecialchars(i18n($r->type),null,"ISO8859-1")."</option>\n";
}
echo "</select>".REQUIREDFIELD."</td></tr>";
@ -292,7 +292,7 @@ if($config['project_type'] == 'yes'){
echo "<option value=\"\">".i18n("Select a division")."</option>\n";
while($r=mysql_fetch_object($q)) {
if($r->id == $projectinfo->projectdivisions_id) $sel="selected=\"selected\""; else $sel="";
echo "<option $sel value=\"$r->id\">".htmlspecialchars(i18n($r->division))."</option>\n";
echo "<option $sel value=\"$r->id\">".htmlspecialchars(i18n($r->division),null,"ISO8859-1")."</option>\n";
}
echo "</select>".REQUIREDFIELD;
@ -400,7 +400,7 @@ if($config['project_type'] == 'yes'){
}
echo "</td></tr>";
echo "<tr><td>".i18n("Summary").": </td><td><textarea onchange='countwords()' onkeypress='countwords()' cols=\"60\" rows=\"12\" id=\"summary\" name=\"summary\">".htmlspecialchars($projectinfo->summary)."</textarea>".REQUIREDFIELD."<br />";
echo "<tr><td>".i18n("Summary").": </td><td><textarea onchange='countwords()' onkeypress='countwords()' cols=\"60\" rows=\"12\" id=\"summary\" name=\"summary\">".htmlspecialchars($projectinfo->summary,null,"ISO8859-1")."</textarea>".REQUIREDFIELD."<br />";
$summarywords=preg_split("/[\s,]+/",$projectinfo->summary);
$summarywordcount=count($summarywords);
@ -413,7 +413,7 @@ if($config['project_type'] == 'yes'){
echo i18n("%1 words maximum",array($config['participant_project_summary_wordmax']));
echo "</div>";
echo"<tr><td>".i18n("Feedback").": </td><td><textarea cols=\"60\" rows=\"4\" id=\"feedback\" name=\"feedback\">".htmlspecialchars($projectinfo->feedback)."</textarea><br />";
echo"<tr><td>".i18n("Feedback").": </td><td><textarea cols=\"60\" rows=\"4\" id=\"feedback\" name=\"feedback\">".htmlspecialchars($projectinfo->feedback,null,"ISO8859-1")."</textarea><br />";
?>
</td></tr>