Skip to content
Snippets Groups Projects
Commit a71bd15f authored by Elmar Ludwig's avatar Elmar Ludwig Committed by Jan-Hendrik Willms
Browse files

drop formatReady for items where no formatted input is available, fixes #3222

Closes #3222

Merge request studip/studip!2185
parent b6456838
No related branches found
No related tags found
No related merge requests found
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
<? endif ?> <? endif ?>
</div> </div>
<? endif ?> <? endif ?>
<?= formatReady($answer['answerdata']['text']) ?> <?= htmlReady($answer['answerdata']['text']) ?>
</li> </li>
<? endif ?> <? endif ?>
<? endforeach ?> <? endforeach ?>
......
...@@ -30,7 +30,7 @@ $options = $vote->questiondata['options']; ...@@ -30,7 +30,7 @@ $options = $vote->questiondata['options'];
<? foreach ($vote->questiondata['statements'] as $key => $statement) : ?> <? foreach ($vote->questiondata['statements'] as $key => $statement) : ?>
<tr> <tr>
<td> <td>
<strong><?= formatReady($statement) ?></strong> <strong><?= htmlReady($statement) ?></strong>
</td> </td>
<? foreach($options as $option_index => $option) : ?> <? foreach($options as $option_index => $option) : ?>
......
...@@ -30,7 +30,7 @@ $options = range($vote->questiondata['minimum'], $vote->questiondata['maximum']) ...@@ -30,7 +30,7 @@ $options = range($vote->questiondata['minimum'], $vote->questiondata['maximum'])
<? foreach ($vote->questiondata['statements'] as $key => $statement) : ?> <? foreach ($vote->questiondata['statements'] as $key => $statement) : ?>
<tr> <tr>
<td> <td>
<strong><?= formatReady($statement) ?></strong> <strong><?= htmlReady($statement) ?></strong>
</td> </td>
<? foreach($options as $option) : ?> <? foreach($options as $option) : ?>
......
...@@ -38,7 +38,7 @@ $responseData = $response['answerdata'] ? $response['answerdata']->getArrayCopy( ...@@ -38,7 +38,7 @@ $responseData = $response['answerdata'] ? $response['answerdata']->getArrayCopy(
<?= isset($responseData['answers']) && $index == $responseData['answers'] ? 'checked' : '' ?>> <?= isset($responseData['answers']) && $index == $responseData['answers'] ? 'checked' : '' ?>>
<? endif ?> <? endif ?>
<?= formatReady($answers[$index]) ?> <?= htmlReady($answers[$index]) ?>
</label> </label>
</li> </li>
......
...@@ -42,7 +42,7 @@ $ordered_answer_options = []; ...@@ -42,7 +42,7 @@ $ordered_answer_options = [];
$ordered_users = []; $ordered_users = [];
foreach ($ordered_results as $index => $value) { foreach ($ordered_results as $index => $value) {
if ($value > 0) { if ($value > 0) {
$ordered_answer_options[] = strip_tags(formatReady($options[$index])); $ordered_answer_options[] = $options[$index];
} else { } else {
unset($ordered_results[$index]); unset($ordered_results[$index]);
} }
...@@ -89,7 +89,7 @@ rsort($ordered_results); ...@@ -89,7 +89,7 @@ rsort($ordered_results);
<? $percentage = ($countAnswers && isset($results[$key])) ? round((int) $results[$key] / $countAnswers * 100) : 0 ?> <? $percentage = ($countAnswers && isset($results[$key])) ? round((int) $results[$key] / $countAnswers * 100) : 0 ?>
<td style="text-align: right; background-size: <?= $percentage ?>% 100%; background-position: right center; background-image: url('<?= Assets::image_path("vote_lightgrey.png") ?>'); background-repeat: no-repeat;" width="50%"> <td style="text-align: right; background-size: <?= $percentage ?>% 100%; background-position: right center; background-image: url('<?= Assets::image_path("vote_lightgrey.png") ?>'); background-repeat: no-repeat;" width="50%">
<strong><?= formatReady($answer) ?></strong> <strong><?= htmlReady($answer) ?></strong>
</td> </td>
<td style="white-space: nowrap;"> <td style="white-space: nowrap;">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment