diff options
author | Christian Schmidt <github@chsc.dk> | 2018-07-25 22:47:29 +0300 |
---|---|---|
committer | diosmosis <diosmosis@users.noreply.github.com> | 2018-07-25 22:47:29 +0300 |
commit | e09383ebeedd6b6f8dee8b57373027b00e6203b5 (patch) | |
tree | 3d0faed73ba8629a52a000147b99396239cdd0ba /plugins/CoreHome/templates/_topBar.twig | |
parent | ef9c48cc48587776107b1500dc14eef3ffa19154 (diff) |
Replace proxy redirect with rel=noreferrer (#12780)
* Replace proxy redirect with rel=noreferrer
* Add noopener
* Restore action=redirect for non-Matomo links
* Wrap referring URLs
* NO target on download link
* Fix Github links
* Fix whitespace
* Fix tests
* Revert change
* Revert changes
* Fix tests
* Add noreferrer shim for MSIE 10
* Remove all action=redirect links
* Restore noreferrer
* Restore test
* Fix one more occurrence
* Update changelog
* Combine if's
* Fix changelog wording
* Fix stray whitespace
Diffstat (limited to 'plugins/CoreHome/templates/_topBar.twig')
-rw-r--r-- | plugins/CoreHome/templates/_topBar.twig | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/plugins/CoreHome/templates/_topBar.twig b/plugins/CoreHome/templates/_topBar.twig index f722e74ffc..c53ce95577 100644 --- a/plugins/CoreHome/templates/_topBar.twig +++ b/plugins/CoreHome/templates/_topBar.twig @@ -13,12 +13,17 @@ {{ menu._html|raw }} {% else %} <a {% if menu._tooltip is defined %}title="{{ menu._tooltip }}"{% endif %} - id="topmenu-{{ menu._url.module|lower }}" target="_self" - href="index.php{{ menu._url|urlRewriteWithParameters }}" tabindex="3">{{ _self.menuItemLabel(label, icon) }}</a> + {% if menu._url.module is defined %} + id="topmenu-{{ menu._url.module|lower }}" + href="index.php{{ menu._url|urlRewriteWithParameters }}" + {% else %} + href="{{ menu._url }}" rel="noreferrer noopener" + {% endif %} + target="_self" tabindex="3">{{ _self.menuItemLabel(label, icon) }}</a> {% endif %} {% endmacro %} - {% macro isActiveItem(menu, currentModule, currentAction) %}{% if (menu and menu._url and menu._url.module == currentModule and (menu._url.action is empty or menu._url.action == currentAction)) %}active{% endif %}{% endmacro %} + {% macro isActiveItem(menu, currentModule, currentAction) %}{% if (menu and menu._url and menu._url.module is defined and menu._url.module == currentModule and (menu._url.action is empty or menu._url.action == currentAction)) %}active{% endif %}{% endmacro %} {% if topMenuModule is not defined %} {% set topMenuModule = currentModule %} |