Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include rel=”noopener” on links to improve security #211

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions src/__snapshots__/readme.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@
exports[`readme buildReadmeContent should return readme default template content 1`] = `
"<h1 align=\\"center\\">Welcome to readme-md-generator 👋</h1>
<p>
<a href=\\"https://www.npmjs.com/package/readme-md-generator\\" target=\\"_blank\\">
<a href=\\"https://www.npmjs.com/package/readme-md-generator\\" target=\\"_blank\\" rel=\\"noopener noreferrer\\">
<img alt=\\"Version\\" src=\\"https://img.shields.io/npm/v/readme-md-generator.svg\\">
</a>
<img src=\\"https://img.shields.io/badge/npm-%3E%3D5.5.0-blue.svg\\" />
<img src=\\"https://img.shields.io/badge/node-%3E%3D%209.3.0-blue.svg\\" />
<a href=\\"https://github.com/kefranabg/readme-md-generator#readme\\" target=\\"_blank\\">
<a href=\\"https://github.com/kefranabg/readme-md-generator#readme\\" target=\\"_blank\\" rel=\\"noopener noreferrer\\">
<img alt=\\"Documentation\\" src=\\"https://img.shields.io/badge/documentation-yes-brightgreen.svg\\" />
</a>
<a href=\\"https://github.com/kefranabg/readme-md-generator/graphs/commit-activity\\" target=\\"_blank\\">
<a href=\\"https://github.com/kefranabg/readme-md-generator/graphs/commit-activity\\" target=\\"_blank\\" rel=\\"noopener noreferrer\\">
<img alt=\\"Maintenance\\" src=\\"https://img.shields.io/badge/Maintained%3F-yes-green.svg\\" />
</a>
<a href=\\"https://github.com/kefranabg/readme-md-generator/blob/master/LICENSE\\" target=\\"_blank\\">
<a href=\\"https://github.com/kefranabg/readme-md-generator/blob/master/LICENSE\\" target=\\"_blank\\" rel=\\"noopener noreferrer\\">
<img alt=\\"License: MIT\\" src=\\"https://img.shields.io/github/license/kefranabg/readme-md-generator\\" />
</a>
<a href=\\"https://twitter.com/FranckAbgrall\\" target=\\"_blank\\">
<a href=\\"https://twitter.com/FranckAbgrall\\" target=\\"_blank\\" rel=\\"noopener noreferrer\\">
<img alt=\\"Twitter: FranckAbgrall\\" src=\\"https://img.shields.io/twitter/follow/FranckAbgrall.svg?style=social\\" />
</a>
</p>
Expand Down Expand Up @@ -68,13 +68,13 @@ Contributions, issues and feature requests are welcome!<br />Feel free to check

Give a ⭐️ if this project helped you!

<a href=\\"https://www.patreon.com/FranckAbgrall\\">
<a href=\\"https://www.patreon.com/FranckAbgrall\\" target=\\"_blank\\" rel=\\"noopener noreferrer\\">
<img src=\\"https://c5.patreon.com/external/logo/[email protected]\\" width=\\"160\\">
</a>

## 📝 License

Copyright © 2019 [Franck Abgrall](https://github.com/kefranabg).<br />
Copyright © 2020 [Franck Abgrall](https://github.com/kefranabg).<br />
This project is [MIT](https://github.com/kefranabg/readme-md-generator/blob/master/LICENSE) licensed.

***
Expand Down Expand Up @@ -144,7 +144,7 @@ Give a ⭐️ if this project helped you!

## 📝 License

Copyright © 2019 [Franck Abgrall](https://github.com/kefranabg).
Copyright © 2020 [Franck Abgrall](https://github.com/kefranabg).

This project is [MIT](https://github.com/kefranabg/readme-md-generator/blob/master/LICENSE) licensed.

Expand Down
12 changes: 6 additions & 6 deletions templates/default.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<h1 align="center">Welcome to <%= projectName %> 👋</h1>
<p>
<% if (isProjectOnNpm) { -%>
<a href="https://www.npmjs.com/package/<%= projectName %>" target="_blank">
<a href="https://www.npmjs.com/package/<%= projectName %>" target="_blank" rel="noopener noreferrer">
<img alt="Version" src="https://img.shields.io/npm/v/<%= projectName %>.svg">
</a>
<% } -%>
Expand All @@ -14,22 +14,22 @@
<% }) -%>
<% } -%>
<% if (projectDocumentationUrl) { -%>
<a href="<%= projectDocumentationUrl %>" target="_blank">
<a href="<%= projectDocumentationUrl %>" target="_blank" rel="noopener noreferrer">
<img alt="Documentation" src="https://img.shields.io/badge/documentation-yes-brightgreen.svg" />
</a>
<% } -%>
<% if (isGithubRepos) { -%>
<a href="<%= repositoryUrl %>/graphs/commit-activity" target="_blank">
<a href="<%= repositoryUrl %>/graphs/commit-activity" target="_blank" rel="noopener noreferrer">
<img alt="Maintenance" src="https://img.shields.io/badge/Maintained%3F-yes-green.svg" />
</a>
<% } -%>
<% if (licenseName) { -%>
<a href="<%= licenseUrl ? licenseUrl : '#' %>" target="_blank">
<a href="<%= licenseUrl ? licenseUrl : '#' %>" target="_blank" rel="noopener noreferrer">
<img alt="License: <%= licenseName %>" src="https://img.shields.io/<%= isGithubRepos ? `github/license/${authorGithubUsername}/${projectName}` : `badge/License-${licenseName}-yellow.svg` %>" />
</a>
<% } -%>
<% if (authorTwitterUsername) { -%>
<a href="https://twitter.com/<%= authorTwitterUsername %>" target="_blank">
<a href="https://twitter.com/<%= authorTwitterUsername %>" target="_blank" rel="noopener noreferrer">
<img alt="Twitter: <%= authorTwitterUsername %>" src="https://img.shields.io/twitter/follow/<%= authorTwitterUsername %>.svg?style=social" />
</a>
<% } -%>
Expand Down Expand Up @@ -109,7 +109,7 @@ Contributions, issues and feature requests are welcome!<br />Feel free to check
Give a ⭐️ if this project helped you!
<% if (authorPatreonUsername) { -%>

<a href="https://www.patreon.com/<%= authorPatreonUsername %>">
<a href="https://www.patreon.com/<%= authorPatreonUsername %>" target="_blank" rel="noopener noreferrer">
<img src="https://c5.patreon.com/external/logo/[email protected]" width="160">
</a>
<% } -%>
Expand Down
Loading