Add rel="noopener" to external links

It is recommended to open external links using rel=noopener for both
security and performance reasons.

https://developers.google.com/web/tools/lighthouse/audits/noopener

Change-Id: Ic8fadadbf16f876231345dfdd300a0d2f6a658f2
This commit is contained in:
Becky Siegel
2016-12-27 12:07:18 -08:00
parent 1b44bb8430
commit 82ac09fdd9
3 changed files with 5 additions and 4 deletions

View File

@@ -24,7 +24,7 @@ limitations under the License.
}
</style>
<template is="dom-if" if="[[_showWebLink]]">
<a target="_blank"
<a target="_blank" rel="noopener"
href$="[[_webLink]]">[[_computeShortHash(commitInfo)]]</a>
</template>
<template is="dom-if" if="[[!_showWebLink]]">

View File

@@ -55,7 +55,7 @@ limitations under the License.
</span>
<span is="dom-if" if="[[filesWeblinks.meta_a]]" class="filesWeblinks">
<template is="dom-repeat" items="[[filesWeblinks.meta_a]]" as="weblink">
<a target="_blank"
<a target="_blank" rel="noopener"
href$="[[weblink.url]]">[[weblink.name]]</a>
</template>
</span>

View File

@@ -127,12 +127,13 @@ limitations under the License.
</div>
</main>
<footer role="contentinfo">
Powered by <a href="https://www.gerritcodereview.com/" target="_blank">Gerrit Code Review</a>
Powered by <a href="https://www.gerritcodereview.com/" rel="noopener"
target="_blank">Gerrit Code Review</a>
([[_version]])
|
<a class="feedback"
href="https://bugs.chromium.org/p/gerrit/issues/entry?template=PolyGerrit%20Issue"
target="_blank">Report PolyGerrit Bug</a>
rel="noopener" target="_blank">Report PolyGerrit Bug</a>
<template is="dom-if" if="[[_computeShowGwtUiLink(_serverConfig)]]">
|
<a id="gwtLink" href$="/?polygerrit=0#[[_path]]" rel="external">GWT UI</a>