Skip to content
Merged
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
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,9 @@ rc-qrcode is released under the MIT license.

- Util part is from [qrcode.react](https://github.com/zpao/qrcode.react) under ISC license.
- QR Code generation part is from [qrcode-generator](https://www.nayuki.io/page/qr-code-generator-library) under MIT license.

## 🤝 Contributing

<a href="https://openomy.app/github/react-component/qrcode" target="_blank" style="display: block; width: 100%;" align="center">
<img src="https://www.openomy.app/svg?repo=react-component/qrcode&chart=bubble&latestMonth=24" target="_blank" alt="Contribution Leaderboard" style="display: block; width: 100%;" />
</a>
Comment on lines +77 to +79
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

为 target="_blank" 链接添加 rel 属性并移除无效的 target

  • <a> 标签使用了 target="_blank",应添加 rel="noopener noreferrer" 以防止新窗口能够通过 window.opener 操控原窗口的风险。
  • <img> 标签上的 target="_blank" 属性在 HTML 中无效,应当移除。
-<a href="https://openomy.app/github/react-component/qrcode" target="_blank" style="display: block; width: 100%;" align="center">
+<a href="https://openomy.app/github/react-component/qrcode" target="_blank" rel="noopener noreferrer" style="display: block; width: 100%;" align="center">
-  <img src="https://www.openomy.app/svg?repo=react-component/qrcode&chart=bubble&latestMonth=24" target="_blank" alt="Contribution Leaderboard" style="display: block; width: 100%;" />
+  <img src="https://www.openomy.app/svg?repo=react-component/qrcode&chart=bubble&latestMonth=24" alt="Contribution Leaderboard" style="display: block; width: 100%;" />
</a>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<a href="https://openomy.app/github/react-component/qrcode" target="_blank" style="display: block; width: 100%;" align="center">
<img src="https://www.openomy.app/svg?repo=react-component/qrcode&chart=bubble&latestMonth=24" target="_blank" alt="Contribution Leaderboard" style="display: block; width: 100%;" />
</a>
<a href="https://openomy.app/github/react-component/qrcode" target="_blank" rel="noopener noreferrer" style="display: block; width: 100%;" align="center">
<img src="https://www.openomy.app/svg?repo=react-component/qrcode&chart=bubble&latestMonth=24" alt="Contribution Leaderboard" style="display: block; width: 100%;" />
</a>
🤖 Prompt for AI Agents
In README.md around lines 77 to 79, the anchor tag with target="_blank" lacks
the rel="noopener noreferrer" attribute, which is needed for security to prevent
the new window from accessing the original window. Add rel="noopener noreferrer"
to the <a> tag. Also, remove the invalid target="_blank" attribute from the
<img> tag since it is not valid on images.

Loading