mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-13 09:07:29 +02:00
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:
parent
c2cd169b64
commit
e19b9ac56e
5 changed files with 26 additions and 10 deletions
|
@ -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}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue