add rel='noopener' wherever we do target='_blank' because https://mathiasbynens.github.io/rel-noopener/

pull/1978/head
Matthew Hodgson 2016-08-15 21:37:37 +01:00
parent 40aee5b03d
commit d3eccc1d6f
1 changed files with 2 additions and 2 deletions

View File

@ -80,7 +80,7 @@ module.exports = React.createClass({
getName: function () { getName: function () {
var name = this.props.name; var name = this.props.name;
if (name && this.props.link) { if (name && this.props.link) {
name = <a href={ this.props.link } target="_blank">{ name }</a>; name = <a href={ this.props.link } target="_blank" rel="noopener">{ name }</a>;
} }
return name; return name;
}, },
@ -169,7 +169,7 @@ module.exports = React.createClass({
{ this.getName() } { this.getName() }
</div> </div>
{ eventMeta } { eventMeta }
<a className="mx_ImageView_link" href={ this.props.src } target="_blank"> <a className="mx_ImageView_link" href={ this.props.src } target="_blank" rel="noopener">
<div className="mx_ImageView_download"> <div className="mx_ImageView_download">
Download this file<br/> Download this file<br/>
<span className="mx_ImageView_size">{ size_res }</span> <span className="mx_ImageView_size">{ size_res }</span>