diff --git a/studs.php b/studs.php index 787e3bf..0bfcf0d 100644 --- a/studs.php +++ b/studs.php @@ -89,7 +89,7 @@ if(issetAndNoEmpty('export', $_GET) && $dsondage !== false) { // quand on ajoute un commentaire utilisateur if(isset($_POST['ajoutcomment']) || isset($_POST['ajoutcomment_x'])) { - if (isset($_SESSION['nom'])) { + if (isset($_SESSION['nom']) && issetAndNoEmpty('commentuser') === false) { // Si le nom vient de la session, on le de-htmlentities $comment_user = html_entity_decode($_SESSION['nom'], ENT_QUOTES, 'UTF-8'); } elseif(issetAndNoEmpty('commentuser')) { @@ -636,9 +636,12 @@ if ($comment_user->RecordCount() != 0) { print '
' .'

' ._("Add a comment in the poll:") . '

' . "\n"; if (isset($_SESSION['nom']) === false) { - echo _("Name") .' : '; - echo '
'."\n"; -} + $nom = ''; +} else { + $nom = stripslashes($_SESSION['nom']); +} +echo _("Name") .' : '; +echo '
'."\n"; echo ''."\n"; echo '
'."\n";