1
0
mirror of https://git.cant.at/Madeorsk/PollVerlaine synced 2024-11-21 14:54:32 +01:00

Do not show HTML for items labels.

This commit is contained in:
Madeorsk 2019-05-04 11:53:21 +02:00
parent 4c3241349e
commit f168daf94d
2 changed files with 2 additions and 2 deletions

View File

@ -5,7 +5,7 @@
<div class="option"> <div class="option">
<input type="<?= $poll->settings->multiple_choices ? "checkbox" : "radio" ?>" name="options[]" value="<?= $id ?>" id="option-<?= $id ?>" /> <input type="<?= $poll->settings->multiple_choices ? "checkbox" : "radio" ?>" name="options[]" value="<?= $id ?>" id="option-<?= $id ?>" />
<label for="option-<?= $id ?>" class="check"></label> <label for="option-<?= $id ?>" class="check"></label>
<label for="option-<?= $id ?>"><?= $option->label ?></label> <label for="option-<?= $id ?>"><?= htmlspecialchars($option->label) ?></label>
</div> </div>
<?php endforeach; ?> <?php endforeach; ?>
<input type="submit" value="Vote" /> <input type="submit" value="Vote" />

View File

@ -11,7 +11,7 @@ foreach ($poll->options as $option)
<?php foreach ($poll->options as $index => $option): ?> <?php foreach ($poll->options as $index => $option): ?>
<tr> <tr>
<td class="number"><?= $option->votes ?></td> <td class="number"><?= $option->votes ?></td>
<td style="color: <?= $chart_colors[$index%$chart_colors_number] ?>"><?= $option->label ?></td> <td style="color: <?= $chart_colors[$index%$chart_colors_number] ?>"><?= htmlspecialchars($option->label) ?></td>
<td><?= $total_votes == 0 ? 0 : round($option->votes / $total_votes, 3)*100 ?>%</td> <td><?= $total_votes == 0 ? 0 : round($option->votes / $total_votes, 3)*100 ?>%</td>
</tr> </tr>
<?php endforeach; ?> <?php endforeach; ?>