diff --git a/htdocs/opensurvey/adminstuds.php b/htdocs/opensurvey/adminstuds.php
index bb31acf0d99..1f107a7e1af 100644
--- a/htdocs/opensurvey/adminstuds.php
+++ b/htdocs/opensurvey/adminstuds.php
@@ -193,24 +193,24 @@ $adresseadmin=$object->mail_admin;
print $langs->trans("Title") .'
'."\n";
//affichage du titre du sondage
$titre=str_replace("\\","",$object->titre);
-print '
'.$titre.' '."\n";
+print '
'.htmlentities($titre).' '."\n";
//affichage du nom de l'auteur du sondage
-print $langs->trans("InitiatorOfPoll") .' : '.$object->nom_admin.'
'."\n";
+print $langs->trans("InitiatorOfPoll") .' : '.htmlentities($object->nom_admin).'
'."\n";
//affichage des commentaires du sondage
if ($object->commentaires)
{
print '
'.$langs->trans("Description") .' :
'."\n";
- $commentaires=dol_nl2br($object->commentaires);
+ $commentaires=dol_nl2br(htmlentities($object->commentaires));
print $commentaires;
print '
'."\n";
}
@@ -695,7 +695,7 @@ if ($object->format=="D"||$object->format=="D+")
for ($i = 0; isset($toutsujet[$i]); $i++) {
$heures=explode('@', $toutsujet[$i]);
if (isset($heures[1])) {
- print '
'.$heures[1].' '."\n";
+ print '
'.htmlentities($heures[1]).' '."\n";
} else {
print '
'."\n";
}
@@ -748,8 +748,7 @@ while ($compteur < $num)
print '
'."\n";
// Name
- $nombase=str_replace("°","'",$obj->nom);
- print '
'.$nombase.' '."\n";
+ print '
'.htmlentities($obj->nom).' '."\n";
// si la ligne n'est pas a changer, on affiche les données
if (! $testligneamodifier)
@@ -1045,9 +1044,9 @@ if ($nbofcheckbox >= 2)
print '
'."\n";
if (isset($meilleurecolonne) && $compteursujet == "1") {
- print " " . $langs->trans('TheBestChoice') . " : $meilleursujet " . $langs->trans("with") . " $meilleurecolonne " . $vote_str . ".\n";
+ print " " . $langs->trans('TheBestChoice') . " : ".htmlentities($meilleursujet)." " . $langs->trans("with") . " $meilleurecolonne " . $vote_str . ".\n";
} elseif (isset($meilleurecolonne)) {
- print " " . $langs->trans('TheBestChoices') . " : $meilleursujet " . $langs->trans("with") . " $meilleurecolonne " . $vote_str . ".\n";
+ print " " . $langs->trans('TheBestChoices') . " : ".htmlentities($meilleursujet)." " . $langs->trans("with") . " $meilleurecolonne " . $vote_str . ".\n";
}
print '
'."\n";
}
diff --git a/htdocs/opensurvey/public/studs.php b/htdocs/opensurvey/public/studs.php
index 812555e83e5..f31fd86b124 100644
--- a/htdocs/opensurvey/public/studs.php
+++ b/htdocs/opensurvey/public/studs.php
@@ -240,16 +240,16 @@ print '
'."\n";
//affichage du titre du sondage
$titre=str_replace("\\","",$object->titre);
-print ''.$titre.' '."\n";
+print ''.htmlentities($titre).' '."\n";
//affichage du nom de l'auteur du sondage
-print $langs->trans("InitiatorOfPoll") .' : '.$object->nom_admin.' '."\n";
+print $langs->trans("InitiatorOfPoll") .' : '.htmlentities($object->nom_admin).' '."\n";
//affichage des commentaires du sondage
if ($object->commentaires)
{
print ' '.$langs->trans("Description") .' : '."\n";
- $commentaires=dol_nl2br($object->commentaires);
+ $commentaires=dol_nl2br(htmlentities($object->commentaires));
print $commentaires;
print ' '."\n";
}
@@ -339,7 +339,7 @@ if ($object->format=="D"||$object->format=="D+")
for ($i=0; isset($toutsujet[$i]); $i++) {
$heures=explode('@',$toutsujet[$i]);
if (isset($heures[1])) {
- print '
'.$heures[1].' '."\n";
+ print ''.htmlentities($heures[1]).' '."\n";
} else {
print ' '."\n";
}
@@ -392,8 +392,7 @@ if ($object->allow_spy) {
$mod_ok = (! empty($nombase) && in_array($nombase, $listofvoters));
// Name
- $nombase=str_replace("°","'",$obj->nom);
- print ''.$nombase.' '."\n";
+ print ''.htmlentities($obj->nom).' '."\n";
// si la ligne n'est pas a changer, on affiche les données
if (! $testligneamodifier)
@@ -691,7 +690,7 @@ if ($comments)
foreach ($comments as $obj) {
print '";
+ print htmlentities($obj->usercomment).' : ";
}
}