Sanitize survey frontend and PDF output
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
{% include '@Survey/frontend/_survey_assets.html.twig' %}
|
||||
{% include '@Survey/frontend/_survey_branding.html.twig' %}
|
||||
|
||||
{% set moduleHeadline = headline is iterable ? headline.text|default('') : headline|default('') %}
|
||||
{% set moduleHeadline = (headline is iterable ? headline.text|default('') : headline|default(''))|striptags|trim %}
|
||||
|
||||
<section class="survey-shell survey-grid">
|
||||
{% if moduleHeadline %}
|
||||
@@ -60,8 +60,8 @@
|
||||
<div class="survey-grid">
|
||||
{% for editor in editors %}
|
||||
<div>
|
||||
<strong>{{ [editor.firstname, editor.lastname]|join(' ')|trim ?: editor.email }}</strong><br>
|
||||
<span>{{ editor.email }}</span>
|
||||
<strong>{{ ([editor.firstname, editor.lastname]|join(' ')|trim|striptags) ?: (editor.email|striptags|trim) }}</strong><br>
|
||||
<span>{{ editor.email|striptags|trim }}</span>
|
||||
</div>
|
||||
{% else %}
|
||||
<div>Keine Editoren hinterlegt.</div>
|
||||
@@ -135,8 +135,8 @@
|
||||
{% if question.mandatory %}<span class="survey-badge warning">Pflicht</span>{% endif %}
|
||||
{% if loop.first %}<span class="survey-badge success">Start</span>{% endif %}
|
||||
</div>
|
||||
<h4>{{ question.question }}</h4>
|
||||
<p>{{ question.description ?: 'Keine Zusatzbeschreibung.' }}</p>
|
||||
<h4>{{ question.question|striptags|trim }}</h4>
|
||||
<p>{{ (question.description|striptags|trim) ?: 'Keine Zusatzbeschreibung.' }}</p>
|
||||
{% if not locked %}
|
||||
<div class="survey-button-row">
|
||||
<a class="survey-button secondary" href="?survey={{ survey.id }}&question={{ question.id }}">Bearbeiten</a>
|
||||
@@ -169,9 +169,9 @@
|
||||
<div class="survey-grid">
|
||||
{% for condition in conditions %}
|
||||
<article class="survey-card">
|
||||
<div><strong>Wenn Antwort = {{ condition.answerValue }}</strong></div>
|
||||
<div>{{ condition.sourceQuestionLabel ?: ('Frage #' ~ condition.sourceQuestion) }}</div>
|
||||
<div>weiter zu {{ condition.targetQuestionLabel ?: ('Frage #' ~ condition.targetQuestion) }}</div>
|
||||
<div><strong>Wenn Antwort = {{ condition.answerValue|striptags|trim }}</strong></div>
|
||||
<div>{{ (condition.sourceQuestionLabel|striptags|trim) ?: ('Frage #' ~ condition.sourceQuestion) }}</div>
|
||||
<div>weiter zu {{ (condition.targetQuestionLabel|striptags|trim) ?: ('Frage #' ~ condition.targetQuestion) }}</div>
|
||||
{% if not locked %}
|
||||
<div class="survey-button-row">
|
||||
<a class="survey-button secondary" href="?survey={{ survey.id }}&condition={{ condition.id }}">Bearbeiten</a>
|
||||
|
||||
Reference in New Issue
Block a user