Skip to content

Commit 1dbb48d

Browse files
author
Quy
committed
Don't output empty target attribute
1 parent 93d4d8e commit 1dbb48d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

administrator/modules/mod_submenu/tmpl/default.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
$alt = $params->get('menu_text') ? '' : htmlspecialchars($item->title, ENT_QUOTES, 'UTF-8');
7373
endif;
7474
?>
75-
<a class="flex-grow-1" href="<?php echo $item->link; ?>" target="<?php echo $item->target; ?>">
75+
<a class="flex-grow-1" href="<?php echo $item->link; ?>"<?php echo !empty($item->target) ? ' target="' . $item->target . '"' : ''; ?>>
7676
<?php if (!empty($params->get('menu_image'))) : ?>
7777
<?php echo HTMLHelper::_('image', $image, $alt, 'class="' . $class . '"'); ?>
7878
<?php endif; ?>
@@ -97,7 +97,7 @@
9797
<?php if (!$permission || $user->authorise($permission, $scope)) : ?>
9898
<a href="<?php echo $link; ?>">
9999
<span class="fa fa-<?php echo $icon; ?> fa-xs" title="<?php echo htmlentities($title); ?>" aria-hidden="true"></span>
100-
<span class="sr-only"><?php echo htmlentities($sronly); ?></span>
100+
<span class="sr-only"><?php echo htmlentities($sronly); ?></span>
101101
</a>
102102
<?php endif; ?>
103103
</span>

0 commit comments

Comments
 (0)