Skip to content

Commit

Permalink
Replaced usage of htmlentities with dol_htmlentities
Browse files Browse the repository at this point in the history
  • Loading branch information
marcosgdf committed Jan 5, 2014
1 parent b32fafe commit 0f08fd3
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
12 changes: 6 additions & 6 deletions htdocs/opensurvey/card.php
Expand Up @@ -207,24 +207,24 @@
print $langs->trans("Title") .'</td><td colspan="2">';
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>';

// Auteur
print '<tr><td>';
print $langs->trans("Author") .'</td><td colspan="2">';
print htmlentities($object->nom_admin);
print dol_htmlentities($object->nom_admin);
print '</td></tr>';

// Description
print '<tr><td>'.$langs->trans("Description") .'</td><td colspan="2">';
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>';

// EMail
Expand Down Expand Up @@ -330,7 +330,7 @@
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
Expand Down
4 changes: 2 additions & 2 deletions htdocs/opensurvey/list.php
Expand Up @@ -94,11 +94,11 @@
print '<tr '.$bc[$var].'>';
print '<td>';
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';
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 '</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');
if ($db->jdate($obj->date_fin) < time()) { print ' '.img_warning(); }
Expand Down
12 changes: 6 additions & 6 deletions htdocs/opensurvey/public/studs.php
Expand Up @@ -240,12 +240,12 @@

//affichage du titre du sondage
$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
if ($object->commentaires)
{
$commentaires=dol_nl2br(htmlentities($object->commentaires));
$commentaires=dol_nl2br(dol_htmlentities($object->commentaires));
print $commentaires;
print '<br>'."\n";
}
Expand Down Expand Up @@ -335,7 +335,7 @@
for ($i=0; isset($toutsujet[$i]); $i++) {
$heures=explode('@',$toutsujet[$i]);
if (isset($heures[1])) {
print '<td class="heure">'.htmlentities($heures[1]).'</td>'."\n";
print '<td class="heure">'.dol_htmlentities($heures[1]).'</td>'."\n";
} else {
print '<td class="heure"></td>'."\n";
}
Expand Down Expand Up @@ -392,7 +392,7 @@
print '<tr>'."\n";

// 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
if (! $testligneamodifier)
Expand Down Expand Up @@ -650,7 +650,7 @@
else
{
$tmps=explode('@',$toutsujet[$i]);
$meilleursujet .= htmlentities($tmps[0]);
$meilleursujet .= dol_htmlentities($tmps[0]);
}

$compteursujet++;
Expand Down Expand Up @@ -689,7 +689,7 @@
foreach ($comments as $obj) {
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> ';
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>";
}
}

Expand Down
8 changes: 4 additions & 4 deletions htdocs/opensurvey/results.php
Expand Up @@ -691,7 +691,7 @@
for ($i = 0; isset($toutsujet[$i]); $i++) {
$heures=explode('@', $toutsujet[$i]);
if (isset($heures[1])) {
print '<td class="heure">'.htmlentities($heures[1]).'</td>'."\n";
print '<td class="heure">'.dol_htmlentities($heures[1]).'</td>'."\n";
} else {
print '<td class="heure"></td>'."\n";
}
Expand All @@ -714,7 +714,7 @@
for ($i = 0; isset($toutsujet[$i]); $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";
Expand Down Expand Up @@ -750,7 +750,7 @@
}

// 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
if (! $testligneamodifier)
Expand Down Expand Up @@ -1017,7 +1017,7 @@
else
{
$tmps=explode('@',$toutsujet[$i]);
$meilleursujet .= htmlentities($tmps[0]);
$meilleursujet .= dol_htmlentities($tmps[0]);
}

$compteursujet++;
Expand Down

0 comments on commit 0f08fd3

Please sign in to comment.