Merge pull request #2496 from matrix-org/dbkr/target_blank

Add target="_blank" to links that don't have it
This commit is contained in:
David Baker 2019-01-24 18:15:18 +00:00 committed by GitHub
commit 8c412b85ee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 26 additions and 6 deletions

View file

@ -26,7 +26,7 @@ module.exports = React.createClass({
render: function() {
return (
<div className="mx_AuthFooter">
<a href="https://matrix.org">{ _t("powered by Matrix") }</a>
<a href="https://matrix.org" target="_blank" rel="noopener">{ _t("powered by Matrix") }</a>
</div>
);
},

View file

@ -71,7 +71,11 @@ module.exports = React.createClass({
ReactDOM.render(_t(
"Robot check is currently unavailable on desktop - please use a <a>web browser</a>",
{},
{ 'a': (sub) => { return <a href='https://riot.im/app'>{ sub }</a>; }}), warning);
{
'a': (sub) => {
return <a target="_blank" rel="noopener" href='https://riot.im/app'>{ sub }</a>;
},
}), warning);
this.refs.recaptchaContainer.appendChild(warning);
} else {
const scriptTag = document.createElement('script');

View file

@ -115,7 +115,11 @@ module.exports = React.createClass({
'making encrypted chat history unreadable, unless you first export your room keys ' +
'and re-import them afterwards. ' +
'In future this will be improved.',
) } (<a href="https://github.com/vector-im/riot-web/issues/2671">https://github.com/vector-im/riot-web/issues/2671</a>)
) }
{' '}
<a href="https://github.com/vector-im/riot-web/issues/2671" target="_blank" rel="noopener">
https://github.com/vector-im/riot-web/issues/2671
</a>
</div>,
button: _t("Continue"),
extraButtons: [