Add rel="noreferrer noopener" to <a> with target="_blank" (#531)

* Add rel="noreferrer noopener" to <a> with target="_blank"

* Run Prettier
This commit is contained in:
Yangshun Tay 2018-04-07 19:14:29 -07:00 committed by Joel Marcey
parent c2cd169b64
commit e19b9ac56e
5 changed files with 26 additions and 10 deletions

View file

@ -44,7 +44,7 @@ class BlogPost extends React.Component {
if (post.authorFBID) {
return (
<div className={className}>
<a href={post.authorURL} target="_blank">
<a href={post.authorURL} target="_blank" rel="noreferrer noopener">
<img
src={
'https://graph.facebook.com/' +
@ -59,7 +59,7 @@ class BlogPost extends React.Component {
} else if (post.authorImage) {
return (
<div className={className}>
<a href={post.authorURL} target="_blank">
<a href={post.authorURL} target="_blank" rel="noreferrer noopener">
<img src={post.authorImage} />
</a>
</div>
@ -110,7 +110,10 @@ class BlogPost extends React.Component {
<div className="authorBlock">
{post.author ? (
<p className="post-authorName">
<a href={post.authorURL} target="_blank">
<a
href={post.authorURL}
target="_blank"
rel="noreferrer noopener">
{post.author}
</a>
{post.authorTitle}