diff --git a/src/HtmlUtils.js b/src/HtmlUtils.js index 236aa0157e..7dd68e5c61 100644 --- a/src/HtmlUtils.js +++ b/src/HtmlUtils.js @@ -160,7 +160,7 @@ const transformTags = { // custom to matrix delete attribs.target; } } - attribs.rel = 'noopener'; // https://mathiasbynens.github.io/rel-noopener/ + attribs.rel = 'noreferrer noopener'; // https://mathiasbynens.github.io/rel-noopener/ return { tagName, attribs }; }, 'img': function(tagName, attribs) { diff --git a/src/Markdown.js b/src/Markdown.js index 437ceec88b..fb1f8bf0ea 100644 --- a/src/Markdown.js +++ b/src/Markdown.js @@ -136,7 +136,7 @@ export default class Markdown { // thus opening in a new tab. if (externalLinks) { attrs.push(['target', '_blank']); - attrs.push(['rel', 'noopener']); + attrs.push(['rel', 'noreferrer noopener']); } this.tag('a', attrs); } else { diff --git a/src/components/structures/GroupView.js b/src/components/structures/GroupView.js index 5ae0699a2f..e98dcae1a4 100644 --- a/src/components/structures/GroupView.js +++ b/src/components/structures/GroupView.js @@ -821,10 +821,10 @@ export default createReactClass({ {_t( "Want more than a community? Get your own server", {}, { - a: sub => {sub}, + a: sub => {sub}, }, )} - + ; diff --git a/src/components/structures/MatrixChat.js b/src/components/structures/MatrixChat.js index de916ad7aa..339ea279ee 100644 --- a/src/components/structures/MatrixChat.js +++ b/src/components/structures/MatrixChat.js @@ -1375,7 +1375,8 @@ export default createReactClass({ cancelButton: _t('Dismiss'), onFinished: (confirmed) => { if (confirmed) { - window.open(consentUri, '_blank'); + const wnd = window.open(consentUri, '_blank'); + wnd.opener = null; } }, }, null, true); diff --git a/src/components/structures/auth/Login.js b/src/components/structures/auth/Login.js index c8b2a1ea9c..24e4726416 100644 --- a/src/components/structures/auth/Login.js +++ b/src/components/structures/auth/Login.js @@ -481,7 +481,7 @@ export default createReactClass({ "Either use HTTPS or enable unsafe scripts.", {}, { 'a': (sub) => { - return { sub } @@ -496,11 +496,10 @@ export default createReactClass({ "homeserver's SSL certificate is trusted, and that a browser extension " + "is not blocking requests.", {}, { - 'a': (sub) => { - return + 'a': (sub) => + { sub } - ; - }, + , }, ) } ; diff --git a/src/components/views/auth/AuthFooter.js b/src/components/views/auth/AuthFooter.js index 4076141606..1309800772 100644 --- a/src/components/views/auth/AuthFooter.js +++ b/src/components/views/auth/AuthFooter.js @@ -26,7 +26,7 @@ export default createReactClass({ render: function() { return (
); }, diff --git a/src/components/views/auth/InteractiveAuthEntryComponents.js b/src/components/views/auth/InteractiveAuthEntryComponents.js index 6f6eb7e2a1..aaf8c88440 100644 --- a/src/components/views/auth/InteractiveAuthEntryComponents.js +++ b/src/components/views/auth/InteractiveAuthEntryComponents.js @@ -331,7 +331,7 @@ export const TermsAuthEntry = createReactClass({ checkboxes.push( , ); } @@ -604,6 +604,7 @@ export const FallbackAuthEntry = createReactClass({ this.props.authSessionId, ); this._popupWindow = window.open(url); + this._popupWindow.opener = null; }, _onReceiveMessage: function(event) { diff --git a/src/components/views/auth/ModularServerConfig.js b/src/components/views/auth/ModularServerConfig.js index 32418d3462..d8ce145e20 100644 --- a/src/components/views/auth/ModularServerConfig.js +++ b/src/components/views/auth/ModularServerConfig.js @@ -99,7 +99,7 @@ export default class ModularServerConfig extends ServerConfig { "Enter the location of your Modular homeserver. It may use your own " + "domain name or be a subdomain of modular.im.", {}, { - a: sub => + a: sub => {sub} , }, diff --git a/src/components/views/auth/ServerTypeSelector.js b/src/components/views/auth/ServerTypeSelector.js index 341f81c546..fe29b7f76c 100644 --- a/src/components/views/auth/ServerTypeSelector.js +++ b/src/components/views/auth/ServerTypeSelector.js @@ -46,7 +46,7 @@ export const TYPES = { label: () => _t('Premium'), logo: () => , description: () => _t('Premium hosting for organisations Learn more', {}, { - a: sub => + a: sub => {sub} , }), diff --git a/src/components/views/context_menus/MessageContextMenu.js b/src/components/views/context_menus/MessageContextMenu.js index ea5623fe48..be1c11ef97 100644 --- a/src/components/views/context_menus/MessageContextMenu.js +++ b/src/components/views/context_menus/MessageContextMenu.js @@ -420,7 +420,7 @@ export default createReactClass({ onClick={this.onPermalinkClick} href={permalink} target="_blank" - rel="noopener" + rel="noreferrer noopener" > { mxEvent.isRedacted() || mxEvent.getType() !== 'm.room.message' ? _t('Share Permalink') : _t('Share Message') } @@ -445,7 +445,7 @@ export default createReactClass({ element="a" className="mx_MessageContextMenu_field" target="_blank" - rel="noopener" + rel="noreferrer noopener" onClick={this.closeMenu} href={mxEvent.event.content.external_url} > diff --git a/src/components/views/context_menus/TopLeftMenu.js b/src/components/views/context_menus/TopLeftMenu.js index 51ec202b90..f1309cac2d 100644 --- a/src/components/views/context_menus/TopLeftMenu.js +++ b/src/components/views/context_menus/TopLeftMenu.js @@ -68,10 +68,11 @@ export default class TopLeftMenu extends React.Component { {_t( "Upgrade to your own domain", {}, { - a: sub => {sub}, + a: sub => + {sub}, }, )} - + ; diff --git a/src/components/views/dialogs/ChangelogDialog.js b/src/components/views/dialogs/ChangelogDialog.js index e58f56a639..ab284cdb2e 100644 --- a/src/components/views/dialogs/ChangelogDialog.js +++ b/src/components/views/dialogs/ChangelogDialog.js @@ -52,7 +52,7 @@ export default class ChangelogDialog extends React.Component { _elementsForCommit(commit) { return (