summaryrefslogtreecommitdiffstats
path: root/core/templates
diff options
context:
space:
mode:
authorchristophe canovas <christophecanovas66@gmail.com>2021-06-30 12:34:35 +0200
committernextcloud-command <nextcloud-command@users.noreply.github.com>2022-02-15 09:57:50 +0000
commitd6a9278422e6a6961b29da5955b9ce672a0a5fe9 (patch)
tree51274deb92d88e3b1e3b12cb4c91db7b4178ea67 /core/templates
parentba7a31d73b34c622ed74e6aed8c1695327c2d574 (diff)
downloadnextcloud-server-d6a9278422e6a6961b29da5955b9ce672a0a5fe9.tar.gz
nextcloud-server-d6a9278422e6a6961b29da5955b9ce672a0a5fe9.zip
Target_Blank option to open External links
Signed-off-by: christophe canovas <christophecanovas66@gmail.com> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Diffstat (limited to 'core/templates')
-rw-r--r--core/templates/layout.user.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/templates/layout.user.php b/core/templates/layout.user.php
index c9ca4e23110..3440358c61f 100644
--- a/core/templates/layout.user.php
+++ b/core/templates/layout.user.php
@@ -69,6 +69,7 @@ $getUserAvatar = static function (int $size) use ($_): string {
<?php foreach ($_['navigation'] as $entry): ?>
<li data-id="<?php p($entry['id']); ?>" class="hidden" tabindex="-1">
<a href="<?php print_unescaped($entry['href']); ?>"
+ <?php if ($entry['target']): ?> target="_blank" rel="noreferrer noopener"<?php endif; ?>
<?php if ($entry['active']): ?> class="active"<?php endif; ?>
aria-label="<?php p($entry['name']); ?>">
<svg width="24" height="20" viewBox="0 0 24 20" alt=""<?php if ($entry['unread'] !== 0) { ?> class="has-unread"<?php } ?>>
@@ -105,6 +106,7 @@ $getUserAvatar = static function (int $size) use ($_): string {
<?php foreach ($_['navigation'] as $entry): ?>
<li data-id="<?php p($entry['id']); ?>">
<a href="<?php print_unescaped($entry['href']); ?>"
+ <?php if ($entry['target']): ?> target="_blank" rel="noreferrer noopener"<?php endif; ?>
<?php if ($entry['active']): ?> class="active"<?php endif; ?>
aria-label="<?php p($entry['name']); ?>">
<svg width="20" height="20" viewBox="0 0 20 20" alt=""<?php if ($entry['unread'] !== 0) { ?> class="has-unread"<?php } ?>>