aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorJan-Hendrik Willms <tleilax+studip@gmail.com>2023-03-24 20:45:45 +0000
committerDavid Siegfried <david.siegfried@uni-vechta.de>2023-03-24 20:45:45 +0000
commit92683e73396d7a457f8f9e2789cc9612d588c4f5 (patch)
tree3a3780b7dbe5790305943b30030fc4acb9c3afc4 /app
parent6721569c1a5325840cac1adfc1b7a80fa183737a (diff)
do not open iframe with invalid url and show hint in vue component, fixes #2169, fixes #2168
Closes #2169 and #2168 Merge request studip/studip!1640
Diffstat (limited to 'app')
-rw-r--r--app/views/questionnaire/question_types/info/info.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/views/questionnaire/question_types/info/info.php b/app/views/questionnaire/question_types/info/info.php
index 04bae4f..2faf850 100644
--- a/app/views/questionnaire/question_types/info/info.php
+++ b/app/views/questionnaire/question_types/info/info.php
@@ -1,6 +1,6 @@
<?php
/**
- * @var QuestionnaireQuestion $vote
+ * @var QuestionnaireInfo $vote
*/
?>
@@ -9,7 +9,7 @@
<?= Icon::create('info-circle', Icon::ROLE_INFO)->asImg(20) ?>
</div>
<div class="description">
- <? if (isset($vote->questiondata['url']) && trim($vote->questiondata['url'])) : ?>
+ <? if ($vote->hasValidURL()) : ?>
<iframe <?= is_internal_url($vote->questiondata['url']) ? 'sandbox="allow-forms allow-modals allow-orientation-lock allow-pointer-lock allow-popups allow-presentation allow-scripts"' : '' ?>
src="<?= htmlReady($vote->questiondata['url']) ?>"></iframe>
<? endif ?>