Skip to content
Snippets Groups Projects
Commit d0728100 authored by Elmar Ludwig's avatar Elmar Ludwig Committed by David Siegfried
Browse files

the Icon and Button APIs already escape attributes, fixes #1797

Closes #1797

Merge request studip/studip!1179
parent db86653a
No related branches found
No related tags found
No related merge requests found
Showing
with 29 additions and 29 deletions
......@@ -156,7 +156,7 @@ class Course_IliasInterfaceController extends AuthenticatedController
[
'data-confirm' => sprintf(
_('Verknüpfung zum Kurs in %s entfernen? Hierdurch werden auch die Verknüpfungen zu allen Objekten innerhalb des Kurses entfernt.'),
htmlReady($this->ilias_list[$ilias_index]->getName())
$this->ilias_list[$ilias_index]->getName()
)
]
);
......
......@@ -65,7 +65,7 @@
'formaction' => $controller->url_for("admin/coursewizardsteps/delete/{$step->id}"),
'data-confirm' => sprintf(
_('Soll der Eintrag "%s" wirklich gelöscht werden?'),
htmlReady($step->name)
$step->name
),
])
) ?>
......
......@@ -78,8 +78,8 @@
'title' => _('Konfiguration löschen'),
'formaction' => $controller->url_for("admin/ilias_interface/delete/$ilias_index"),
'data-confirm' => sprintf(
sprintf(_('Soll die ILIAS-Installation "%s" wirklich entfernt werden?'),
htmlReady($ilias_config['name']))
_('Soll die ILIAS-Installation "%s" wirklich entfernt werden?'),
$ilias_config['name']
),
])
) ?>
......
......@@ -57,7 +57,7 @@
<?= Icon::create('trash')->asInput([
'formaction' => $controller->url_for('admin/lti/delete/' . $tool->id),
'title' => _('LTI-Tool löschen'),
'data-confirm' => sprintf(_('Wollen Sie wirklich das LTI-Tool "%s" löschen?'), htmlReady($tool->name))
'data-confirm' => sprintf(_('Wollen Sie wirklich das LTI-Tool "%s" löschen?'), $tool->name)
]) ?>
</td>
</tr>
......
......@@ -38,7 +38,7 @@
</a>
<?=Icon::create('trash', 'clickable', tooltip2(_('Regel löschen')))->asInput([
'formaction' => $controller->url_for('admin/specification/delete/' . $rule['lock_id']),
'data-confirm' => sprintf(_('Wollen Sie die Regel "%s" wirklich löschen?'), htmlReady($rule['name'])),
'data-confirm' => sprintf(_('Wollen Sie die Regel "%s" wirklich löschen?'), $rule['name']),
'style' => 'vertical-align: bottom'
])?>
</td>
......
......@@ -39,7 +39,7 @@
'formaction' => $controller->delete_course_assignment($user, ['course_id' => $course->id]),
'data-confirm' => sprintf(
_('Wollen Sie %s wirklich austragen?'),
htmlReady($user->getFullName())
$user->getFullName()
),
'data-dialog' => 'size=auto'
]) ?>
......@@ -57,7 +57,7 @@
[
'data-confirm' => sprintf(
_('Wollen Sie %s wirklich austragen?'),
htmlReady($user->getFullName())
$user->getFullName()
)
]
) ?>
......
......@@ -14,7 +14,7 @@
<?= Icon::create('trash')->asInput(
['formaction' => $controller->url_for('contact/deleteGroup/' . $filter),
'title' => _('Gruppe löschen'),
'data-confirm' => sprintf(_('Gruppe %s wirklich löschen?'), htmlReady($title))]) ?>
'data-confirm' => sprintf(_('Gruppe %s wirklich löschen?'), $title)]) ?>
<? endif; ?>
</span>
</caption>
......@@ -86,7 +86,7 @@
[
'data-confirm' => sprintf(
_('Wollen Sie %s wirklich von der Liste entfernen'),
htmlReady($contact->username)
$contact->username
),
'formaction' => $controller->url_for('contact/remove/' . $filter, ['user' => $contact->username])
])
......
......@@ -13,7 +13,7 @@
<? else : ?>
<? $num_postings = ForumVisit::getCount($entry['topic_id'], $visitdate) ?>
<?= Icon::create('forum', $num_postings > 0 ? Icon::ROLE_ATTENTION : Icon::ROLE_INFO)->asImg([
'title' => htmlReady(ForumHelpers::getVisitText($num_postings, $entry['topic_id'], $constraint['depth'])),
'title' => ForumHelpers::getVisitText($num_postings, $entry['topic_id'], $constraint['depth']),
'style' => 'margin-bottom: 15px;',
]) ?>
<? endif ?>
......
......@@ -46,7 +46,7 @@
<? else : ?>
<? $num_postings = ForumVisit::getCount($entry['topic_id'], $visitdate) ?>
<?= Icon::create('forum', $num_postings > 0 ? Icon::ROLE_ATTENTION : Icon::ROLE_INFO)->asImg([
'title' => htmlReady(ForumHelpers::getVisitText($num_postings, $entry['topic_id'])),
'title' => ForumHelpers::getVisitText($num_postings, $entry['topic_id']),
]) ?>
<? endif ?>
......@@ -163,7 +163,7 @@
'formaction' => $controller->url_for("course/forum/index/delete_entry/{$entry['topic_id']}"),
'data-confirm' => sprintf(
_('Sind sie sicher dass Sie den Eintrag %s löschen möchten?'),
htmlReady($entry['name'])
$entry['name']
)
]
)
......
......@@ -102,7 +102,7 @@
Icon::create('info-circle'),
[
'title' => _('Info'),
'formaction' => $controller->url_for($module->getRoute('view_course') .'?ilias_search='.htmlReady($ilias_search)),
'formaction' => $controller->url_for($module->getRoute('view_course') .'?ilias_search='.urlencode($ilias_search)),
'data-dialog' => ''
]
)->condition($edit_permission)->addButton(
......
......@@ -71,7 +71,7 @@
Icon::create('trash', Icon::ROLE_CLICKABLE, [
'title' => _('Entfernen'),
'formaction' => $controller->url_for($module->getRoute('remove')),
'data-confirm' => $module->siblings_count < 2 ? sprintf(_('Dies ist die einzige Instanz des Objekts "%s". Durch das Entfernen aus dem Kurs wird das Objekt unwiderruflich gelöscht! Wollen Sie das Objekt wirklich löschen?'), htmlReady($module->getTitle())) : sprintf(_('Wollen Sie das Objekt "%s" jetzt entfernen?'), htmlReady($module->getTitle())),
'data-confirm' => $module->siblings_count < 2 ? sprintf(_('Dies ist die einzige Instanz des Objekts "%s". Durch das Entfernen aus dem Kurs wird das Objekt unwiderruflich gelöscht! Wollen Sie das Objekt wirklich löschen?'), $module->getTitle()) : sprintf(_('Wollen Sie das Objekt "%s" jetzt entfernen?'), $module->getTitle()),
'target' => '_blank',
'rel' => 'noopener noreferrer'
])
......
......@@ -11,7 +11,7 @@
<? endif ?>
<? if ($ilias->isActive() && !$mode) : ?>
<? if ($edit_permission && $module->isAllowed('delete')) : ?>
<?= Studip\LinkButton::create(_('Entfernen'), $controller->url_for($module->getRoute('remove') . '?ilias_search=' . $ilias_search), ['data-confirm' => $module->siblings_count < 2 ? sprintf(_('Dies ist die einzige Instanz des Objekts "%s". Durch das Entfernen aus dem Kurs wird das Objekt unwiderruflich gelöscht! Wollen Sie das Objekt wirklich löschen?'), htmlReady($module->getTitle())) : sprintf(_('Wollen Sie das Objekt "%s" jetzt entfernen?'), htmlReady($module->getTitle()))]) ?>
<?= Studip\LinkButton::create(_('Entfernen'), $controller->url_for($module->getRoute('remove') . '?ilias_search=' . $ilias_search), ['data-confirm' => $module->siblings_count < 2 ? sprintf(_('Dies ist die einzige Instanz des Objekts "%s". Durch das Entfernen aus dem Kurs wird das Objekt unwiderruflich gelöscht! Wollen Sie das Objekt wirklich löschen?'), $module->getTitle()) : sprintf(_('Wollen Sie das Objekt "%s" jetzt entfernen?'), $module->getTitle())]) ?>
<? endif ?>
<?= $module->isAllowed('start') ? Studip\LinkButton::create(_('Starten'), $controller->url_for($module->getRoute('start')), ['target' => '_blank', 'rel' => 'noopener noreferrer']) :'' ?>
<?= $module->isAllowed('edit') ? Studip\LinkButton::create(_('Bearbeiten'), $controller->url_for($module->getRoute('edit')), ['target' => '_blank', 'rel' => 'noopener noreferrer']) :'' ?>
......
......@@ -37,7 +37,7 @@
<?= Icon::create('trash')->asInput([
'formaction' => $controller->url_for('course/lti/delete/' . $lti_data->position),
'title' => _('Abschnitt löschen'),
'data-confirm' => sprintf(_('Wollen Sie wirklich den Abschnitt "%s" löschen?'), htmlReady($lti_data->title))
'data-confirm' => sprintf(_('Wollen Sie wirklich den Abschnitt "%s" löschen?'), $lti_data->title)
]) ?>
</form>
</nav>
......
......@@ -125,7 +125,7 @@
'mail',
Icon::ROLE_CLICKABLE,
[
'title' => sprintf('Nachricht mit Weiterleitung an %s senden', htmlReady($fullname))
'title' => sprintf('Nachricht mit Weiterleitung an %s senden', $fullname)
]
),
['data-dialog' => '']
......@@ -139,7 +139,7 @@
'door-leave',
Icon::ROLE_CLICKABLE,
[
'title' => sprintf(_('%s austragen'), htmlReady($fullname))
'title' => sprintf(_('%s austragen'), $fullname)
]
)
) ?>
......
......@@ -27,7 +27,7 @@
<?= Studip\Button::createAccept(
_('Eintragen'),
'add_dozent',
['title' => sprintf(_("als %s eintragen"), htmlReady($decoratedStatusGroups['dozent']))]
['title' => sprintf(_("als %s eintragen"), $decoratedStatusGroups['dozent'])]
) ?>
<?= Studip\LinkButton::createCancel(_('Abbrechen'), $controller->url_for('course/members/index')) ?>
</td>
......
......@@ -85,7 +85,7 @@
_('Eintragen'),
'add_member_list',
[
'title' => sprintf(_("als %s eintragen"), htmlReady($decoratedStatusGroups['autor']))
'title' => sprintf(_("als %s eintragen"), $decoratedStatusGroups['autor'])
]
) ?>
</td>
......
......@@ -24,7 +24,7 @@
<?= Studip\Button::createAccept(
_('Eintragen'),
'add_tutor',
['title' => sprintf(_('als %s eintragen'), htmlReady($decoratedStatusGroups['tutor']))]
['title' => sprintf(_('als %s eintragen'), $decoratedStatusGroups['tutor'])]
) ?>
<?= Studip\LinkButton::createCancel(_('Abbrechen'), $controller->url_for('course/members/index')) ?>
</td>
......
......@@ -143,7 +143,7 @@
Icon::create(
'mail',
Icon::ROLE_CLICKABLE, [
'title' => sprintf(_('Nachricht mit Weiterleitung an %s senden'), htmlReady($fullname)),
'title' => sprintf(_('Nachricht mit Weiterleitung an %s senden'), $fullname),
]),
['data-dialog' => '']
) ?>
......@@ -162,7 +162,7 @@
Icon::create(
'door-leave',
Icon::ROLE_CLICKABLE,
['title' => sprintf(_('%s austragen'), htmlReady($fullname))])
['title' => sprintf(_('%s austragen'), $fullname)])
) ?>
<? endif ?>
<?= $actionMenu->render() ?>
......
......@@ -82,7 +82,7 @@
<a href="<?= $controller->url_for('profile?username=' . $waiting['username']) ?>" <? if ($waiting['mkdate'] >= $last_visitdate) echo 'class="new-member"'; ?>>
<?= Avatar::getAvatar($waiting['user_id'], $waiting['username'])->getImageTag(Avatar::SMALL, [
'style' => 'margin-right: 5px',
'title' => htmlReady($fullname),
'title' => $fullname,
]) ?>
<?= htmlReady($fullname) ?>
</a>
......@@ -112,7 +112,7 @@
[
'title' => sprintf(
_('Nachricht mit Weiterleitung an %s senden'),
htmlReady($fullname)
$fullname
)
]
),
......@@ -126,7 +126,7 @@
Icon::create(
'door-leave',
'clickable',
['title' => sprintf(_('%s austragen'), htmlReady($fullname))]
['title' => sprintf(_('%s austragen'), $fullname)]
)
) ?>
<? endif ?>
......
......@@ -81,7 +81,7 @@
Icon::create(
'mail',
Icon::ROLE_CLICKABLE,
['title' => sprintf('Nachricht mit Weiterleitung an %s senden', htmlReady($fullname))]
['title' => sprintf('Nachricht mit Weiterleitung an %s senden', $fullname)]
),
['data-dialog' => '1']
) ?>
......@@ -100,7 +100,7 @@
Icon::create(
'door-leave',
Icon::ROLE_CLICKABLE,
['title' => sprintf(_('%s austragen'), htmlReady($fullname))]
['title' => sprintf(_('%s austragen'), $fullname)]
)
) ?>
<? endif ?>
......
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