Replaced usage of htmlentities with dol_htmlentities

This commit is contained in:
Marcos García de La Fuente 2014-01-05 20:18:02 +01:00
parent b32fafef17
commit 0f08fd3f06
4 changed files with 18 additions and 18 deletions

View File

@ -207,24 +207,24 @@ $adresseadmin=$object->mail_admin;
print $langs->trans("Title") .'</td><td colspan="2">'; print $langs->trans("Title") .'</td><td colspan="2">';
if ($action == 'edit') if ($action == 'edit')
{ {
print '<input type="text" name="nouveautitre" size="40" value="'.dol_escape_htmltag(htmlentities($object->titre)).'">'; print '<input type="text" name="nouveautitre" size="40" value="'.dol_escape_htmltag(dol_htmlentities($object->titre)).'">';
} }
else print htmlentities($object->titre); else print dol_htmlentities($object->titre);
print '</td></tr>'; print '</td></tr>';
// Auteur // Auteur
print '<tr><td>'; print '<tr><td>';
print $langs->trans("Author") .'</td><td colspan="2">'; print $langs->trans("Author") .'</td><td colspan="2">';
print htmlentities($object->nom_admin); print dol_htmlentities($object->nom_admin);
print '</td></tr>'; print '</td></tr>';
// Description // Description
print '<tr><td>'.$langs->trans("Description") .'</td><td colspan="2">'; print '<tr><td>'.$langs->trans("Description") .'</td><td colspan="2">';
if ($action == 'edit') if ($action == 'edit')
{ {
print '<textarea name="nouveauxcommentaires" rows="7" cols="80">'. htmlentities($object->commentaires).'</textarea>'."\n"; print '<textarea name="nouveauxcommentaires" rows="7" cols="80">'. dol_htmlentities($object->commentaires).'</textarea>'."\n";
} }
else print dol_nl2br(htmlentities($object->commentaires)); else print dol_nl2br(dol_htmlentities($object->commentaires));
print '</td></tr>'; print '</td></tr>';
// EMail // EMail
@ -330,7 +330,7 @@ if ($comments) {
print '<a href="'.dol_buildpath('/opensurvey/card.php',1).'?deletecomment='.$comment->id_comment.'&id='.$numsondage.'"> '.img_picto('', 'delete.png').'</a> '; print '<a href="'.dol_buildpath('/opensurvey/card.php',1).'?deletecomment='.$comment->id_comment.'&id='.$numsondage.'"> '.img_picto('', 'delete.png').'</a> ';
} }
print htmlentities($comment->usercomment).': '.dol_nl2br(htmlentities($comment->comment))." <br>"; print dol_htmlentities($comment->usercomment).': '.dol_nl2br(dol_htmlentities($comment->comment))." <br>";
} }
} }
else else

View File

@ -94,11 +94,11 @@ while ($i < min($num,$limit))
print '<tr '.$bc[$var].'>'; print '<tr '.$bc[$var].'>';
print '<td>'; print '<td>';
print '<a href="'.dol_buildpath('/opensurvey/card.php',1).'?id='.$obj->id_sondage.'">'.img_picto('','object_opensurvey').' '.$obj->id_sondage.'</a>'; print '<a href="'.dol_buildpath('/opensurvey/card.php',1).'?id='.$obj->id_sondage.'">'.img_picto('','object_opensurvey').' '.$obj->id_sondage.'</a>';
print '</td><td>'.htmlentities($obj->titre).'</td><td>'; print '</td><td>'.dol_htmlentities($obj->titre).'</td><td>';
$type=($obj->format=='A' || $obj->format=='A+')?'classic':'date'; $type=($obj->format=='A' || $obj->format=='A+')?'classic':'date';
print img_picto('',dol_buildpath('/opensurvey/img/'.($type == 'classic'?'chart-32.png':'calendar-32.png'),1),'width="16"',1); print img_picto('',dol_buildpath('/opensurvey/img/'.($type == 'classic'?'chart-32.png':'calendar-32.png'),1),'width="16"',1);
print ' '.$langs->trans($type=='classic'?"TypeClassic":"TypeDate"); print ' '.$langs->trans($type=='classic'?"TypeClassic":"TypeDate");
print '</td><td>'.htmlentities($obj->nom_admin).'</td>'; print '</td><td>'.dol_htmlentities($obj->nom_admin).'</td>';
print '<td align="center">'.dol_print_date($db->jdate($obj->date_fin),'day'); print '<td align="center">'.dol_print_date($db->jdate($obj->date_fin),'day');
if ($db->jdate($obj->date_fin) < time()) { print ' '.img_warning(); } if ($db->jdate($obj->date_fin) < time()) { print ' '.img_warning(); }

View File

@ -240,12 +240,12 @@ print '<div class="corps"> '."\n";
//affichage du titre du sondage //affichage du titre du sondage
$titre=str_replace("\\","",$object->titre); $titre=str_replace("\\","",$object->titre);
print '<strong>'.htmlentities($titre).'</strong><br>'."\n"; print '<strong>'.dol_htmlentities($titre).'</strong><br>'."\n";
//affichage des commentaires du sondage //affichage des commentaires du sondage
if ($object->commentaires) if ($object->commentaires)
{ {
$commentaires=dol_nl2br(htmlentities($object->commentaires)); $commentaires=dol_nl2br(dol_htmlentities($object->commentaires));
print $commentaires; print $commentaires;
print '<br>'."\n"; print '<br>'."\n";
} }
@ -335,7 +335,7 @@ if ($object->format=="D"||$object->format=="D+")
for ($i=0; isset($toutsujet[$i]); $i++) { for ($i=0; isset($toutsujet[$i]); $i++) {
$heures=explode('@',$toutsujet[$i]); $heures=explode('@',$toutsujet[$i]);
if (isset($heures[1])) { if (isset($heures[1])) {
print '<td class="heure">'.htmlentities($heures[1]).'</td>'."\n"; print '<td class="heure">'.dol_htmlentities($heures[1]).'</td>'."\n";
} else { } else {
print '<td class="heure"></td>'."\n"; print '<td class="heure"></td>'."\n";
} }
@ -392,7 +392,7 @@ while ($compteur < $num)
print '<tr>'."\n"; print '<tr>'."\n";
// Name // Name
print '<td class="nom">'.htmlentities($obj->nom).'</td>'."\n"; print '<td class="nom">'.dol_htmlentities($obj->nom).'</td>'."\n";
// si la ligne n'est pas a changer, on affiche les données // si la ligne n'est pas a changer, on affiche les données
if (! $testligneamodifier) if (! $testligneamodifier)
@ -650,7 +650,7 @@ for ($i = 0; $i < $nbcolonnes; $i++) {
else else
{ {
$tmps=explode('@',$toutsujet[$i]); $tmps=explode('@',$toutsujet[$i]);
$meilleursujet .= htmlentities($tmps[0]); $meilleursujet .= dol_htmlentities($tmps[0]);
} }
$compteursujet++; $compteursujet++;
@ -689,7 +689,7 @@ if ($comments)
foreach ($comments as $obj) { foreach ($comments as $obj) {
print '<div class="comment"><span class="usercomment">'; print '<div class="comment"><span class="usercomment">';
if (in_array($obj->usercomment, $listofvoters)) print '<a href="'.$_SERVER["PHP_SELF"].'?deletecomment='.$obj->id_comment.'&sondage='.$numsondage.'"> '.img_picto('', 'delete.png').'</a> '; if (in_array($obj->usercomment, $listofvoters)) print '<a href="'.$_SERVER["PHP_SELF"].'?deletecomment='.$obj->id_comment.'&sondage='.$numsondage.'"> '.img_picto('', 'delete.png').'</a> ';
print htmlentities($obj->usercomment).' :</span> <span class="comment">'.dol_nl2br(htmlentities($obj->comment))."</span></div>"; print dol_htmlentities($obj->usercomment).' :</span> <span class="comment">'.dol_nl2br(dol_htmlentities($obj->comment))."</span></div>";
} }
} }

View File

@ -691,7 +691,7 @@ if ($object->format=="D"||$object->format=="D+")
for ($i = 0; isset($toutsujet[$i]); $i++) { for ($i = 0; isset($toutsujet[$i]); $i++) {
$heures=explode('@', $toutsujet[$i]); $heures=explode('@', $toutsujet[$i]);
if (isset($heures[1])) { if (isset($heures[1])) {
print '<td class="heure">'.htmlentities($heures[1]).'</td>'."\n"; print '<td class="heure">'.dol_htmlentities($heures[1]).'</td>'."\n";
} else { } else {
print '<td class="heure"></td>'."\n"; print '<td class="heure"></td>'."\n";
} }
@ -714,7 +714,7 @@ else
for ($i = 0; isset($toutsujet[$i]); $i++) for ($i = 0; isset($toutsujet[$i]); $i++)
{ {
$tmp=explode('@',$toutsujet[$i]); $tmp=explode('@',$toutsujet[$i]);
print '<td class="sujet">'.htmlentities($tmp[0]).'</td>'."\n"; print '<td class="sujet">'.dol_htmlentities($tmp[0]).'</td>'."\n";
} }
print '<td class="sujet"><a href="'.$_SERVER["PHP_SELF"].'?id='.$numsondage.'&ajoutsujet=1&backtourl='.urlencode($_SERVER["PHP_SELF"]).'">'.img_picto('',dol_buildpath('/opensurvey/img/add-16.png',1),'',1).'</a></td>'."\n"; print '<td class="sujet"><a href="'.$_SERVER["PHP_SELF"].'?id='.$numsondage.'&ajoutsujet=1&backtourl='.urlencode($_SERVER["PHP_SELF"]).'">'.img_picto('',dol_buildpath('/opensurvey/img/add-16.png',1),'',1).'</a></td>'."\n";
@ -750,7 +750,7 @@ while ($compteur < $num)
} }
// Name // Name
print '</td><td class="nom">'.htmlentities($obj->nom).'</td>'."\n"; print '</td><td class="nom">'.dol_htmlentities($obj->nom).'</td>'."\n";
// si la ligne n'est pas a changer, on affiche les données // si la ligne n'est pas a changer, on affiche les données
if (! $testligneamodifier) if (! $testligneamodifier)
@ -1017,7 +1017,7 @@ for ($i = 0; $i < $nbcolonnes; $i++) {
else else
{ {
$tmps=explode('@',$toutsujet[$i]); $tmps=explode('@',$toutsujet[$i]);
$meilleursujet .= htmlentities($tmps[0]); $meilleursujet .= dol_htmlentities($tmps[0]);
} }
$compteursujet++; $compteursujet++;