From 117aeec66727abd6b2b4a6f6ef8dd86d4c19283f Mon Sep 17 00:00:00 2001 From: Suguru Hirahara Date: Fri, 11 Aug 2017 02:16:42 +0900 Subject: [PATCH] Reorganize rel='noopener' Follow-up to #10290 Also: - Add rel='noopener' to brave.com (as the site also may be hacked, which of course should not happen) - Fix a typo - Always rel='noopener' first, target='_blank' second on the same line (to make it easy to search it with regex) Auditors: Test Plan: 1. Search your repo for target='_blank' 2. Make sure external anchor links with target='_blank' have rel='noopener' --- .../components/preferences/helpfulHints.js | 5 ++-- .../preferences/payment/bitcoinDashboard.js | 26 +++++++++---------- .../preferences/payment/enabledContent.js | 2 +- .../components/preferences/paymentsTab.js | 2 +- js/about/about.js | 2 +- js/about/brave.js | 8 ++++-- js/about/contributionStatement.js | 2 +- js/about/newTabComponents/footerInfo.js | 2 +- js/webtorrent/components/torrentViewer.js | 3 +-- 9 files changed, 28 insertions(+), 24 deletions(-) diff --git a/app/renderer/components/preferences/helpfulHints.js b/app/renderer/components/preferences/helpfulHints.js index b1155a06a08..693a360ae51 100644 --- a/app/renderer/components/preferences/helpfulHints.js +++ b/app/renderer/components/preferences/helpfulHints.js @@ -22,8 +22,9 @@ class HelpfulHints extends ImmutableComponent {
+ href='https://community.brave.com/' + data-l10n-id='submitFeedback' + rel='noopener' target='_blank' />
} diff --git a/app/renderer/components/preferences/payment/bitcoinDashboard.js b/app/renderer/components/preferences/payment/bitcoinDashboard.js index c4519e49110..695f356c5cb 100644 --- a/app/renderer/components/preferences/payment/bitcoinDashboard.js +++ b/app/renderer/components/preferences/payment/bitcoinDashboard.js @@ -140,7 +140,7 @@ class BitcoinDashboard extends ImmutableComponent {
  - +
:
- +
- + -1) { return
- -
} diff --git a/app/renderer/components/preferences/payment/enabledContent.js b/app/renderer/components/preferences/payment/enabledContent.js index 9f92682cb1d..d78a6c4f0ab 100644 --- a/app/renderer/components/preferences/payment/enabledContent.js +++ b/app/renderer/components/preferences/payment/enabledContent.js @@ -84,7 +84,7 @@ class EnabledContent extends ImmutableComponent { return
- +
{ diff --git a/js/about/about.js b/js/about/about.js index 5dbde03b4ab..d52037b6222 100644 --- a/js/about/about.js +++ b/js/about/about.js @@ -36,7 +36,7 @@ class AboutAbout extends ImmutableComponent { { aboutUrls.keySeq().sort().filter((aboutSourceUrl) => isNavigatableAboutPage(aboutSourceUrl)).map((aboutSourceUrl) =>
  • - + {aboutSourceUrl}
  • ) diff --git a/js/about/brave.js b/js/about/brave.js index 46085afe5ba..af09050f711 100644 --- a/js/about/brave.js +++ b/js/about/brave.js @@ -60,7 +60,11 @@ class AboutBrave extends React.Component {
      - +  
    @@ -83,7 +87,7 @@ class AboutBrave extends React.Component { }, { html: name === 'rev' - ? {(version && version.substring(0, 7)) || ''} + ? {(version && version.substring(0, 7)) || ''} : version, value: version } diff --git a/js/about/contributionStatement.js b/js/about/contributionStatement.js index bc901083f7c..355b4c35b2f 100644 --- a/js/about/contributionStatement.js +++ b/js/about/contributionStatement.js @@ -451,7 +451,7 @@ class ContributionStatement extends React.Component { transactions.map(function (tx) { return (
  • - + {this.receiptFileName(tx)}
  • diff --git a/js/about/newTabComponents/footerInfo.js b/js/about/newTabComponents/footerInfo.js index 6937e5b28c9..182e4a059e9 100644 --- a/js/about/newTabComponents/footerInfo.js +++ b/js/about/newTabComponents/footerInfo.js @@ -15,7 +15,7 @@ class FooterInfo extends ImmutableComponent { this.props.backgroundImage && this.props.backgroundImage.name ?
    - {this.props.backgroundImage.author} + {this.props.backgroundImage.author}
    {this.props.backgroundImage.name}
    diff --git a/js/webtorrent/components/torrentViewer.js b/js/webtorrent/components/torrentViewer.js index ffdcb40b912..5909505540a 100644 --- a/js/webtorrent/components/torrentViewer.js +++ b/js/webtorrent/components/torrentViewer.js @@ -54,8 +54,7 @@ class TorrentViewer extends React.Component { })} data-l10n-id='poweredByWebTorrent' href='https://webtorrent.io' - rel='noopener' - target='_blank' + rel='noopener' target='_blank' /> ) } else {