Fix/missing noopener noreferrer - #2466
Conversation
… from type reference Removes a block of text in type.md that was marked with an HTML TODO comment instructing its removal. The text was meant to be moved to the overview of the reference docs, which was already done (via Card components on the index page), but this original text was never deleted. This also resolves an issue where the 'Schema composition' link within this leftover block pointed to the wrong page.
built with Refined Cloudflare Pages Action⚡ Cloudflare Pages Deployment
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2466 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 31 31
Lines 695 695
Branches 215 215
=========================================
Hits 695 695 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
|
||
| Understanding these basic data types gives you a strong foundation for building more complex JSON Schemas. | ||
|
|
||
| <!--Remove the text below from this document and add it to the overview of the reference docs--> |
There was a problem hiding this comment.
Hi @kunalverma2512
These changes are not related to the original issue, so they should not be included in this PR.
CC: @vtushar06 please make sure to check for unrelated changes like this during the review as well.
Thanks 🚀
|
Hi @Utkarsh-123github , thanks for catching that! I was doing some earlier work in this PR #2463 to remove orphaned text and those changes accidentally slipped into this branch by mistake. I have restored the text and pushed the update. |
What kind of change does this PR introduce?
Bugfix (Code Quality / Defense-in-depth)
Issue Number:
Screenshots/videos:
N/A (No visual UI changes, structural HTML fix only)
If relevant, did you update the documentation?
N/A
Summary
This PR adds the missing
rel="noopener noreferrer"attribute to 14target="_blank"external links across the repository.While modern browsers automatically apply
noopenerprotections by default, explicitly including these attributes remains an industry standard defense-in-depth practice. Relying entirely on browser defaults leaves users on legacy browsers vulnerable to reverse tabnabbing, and failing to explicitly setnoreferrermeans we still leak referrer data to external sites. Adding these ensures our automated code quality and security scans remain completely clean.These 14 instances slipped through the tooling for two specific reasons:
pages/understanding-json-schema/keywords/index.page.tsx, a Next.js<Link>component was missing it. The ESLint config (plugin:react/recommended) only checks standard HTML<a>tags by default, so it silently bypassed this custom component.applicability-json-schema-fundamentals-part-1.mdblog post and theREADME.md, raw HTML<a>tags were used instead of standard markdown syntax. This bypassed the repository'sStyledMarkdownBlockcomponent (which normally injects therelattributes automatically for markdown links).Does this PR introduce a breaking change?
No
Checklist
Please ensure the following tasks are completed before submitting this pull request.