mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-14 17:47:40 +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
|
@ -31,7 +31,11 @@ class Doc extends React.Component {
|
|||
this.props.metadata.custom_edit_url ||
|
||||
(this.props.config.editUrl && this.props.config.editUrl + docSource);
|
||||
let editLink = editUrl && (
|
||||
<a className="edit-page-link button" href={editUrl} target="_blank">
|
||||
<a
|
||||
className="edit-page-link button"
|
||||
href={editUrl}
|
||||
target="_blank"
|
||||
rel="noreferrer noopener">
|
||||
{editThisDoc}
|
||||
</a>
|
||||
);
|
||||
|
@ -50,7 +54,8 @@ class Doc extends React.Component {
|
|||
'/' +
|
||||
this.props.language
|
||||
}
|
||||
target="_blank">
|
||||
target="_blank"
|
||||
rel="noreferrer noopener">
|
||||
{translateThisDoc}
|
||||
</a>
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue