Skip to content

Fix JSON-LD structured data: XSS escape and FAQ content alignment#942

Closed
Copilot wants to merge 2 commits intodocs/seo-structured-datafrom
copilot/sub-pr-934
Closed

Fix JSON-LD structured data: XSS escape and FAQ content alignment#942
Copilot wants to merge 2 commits intodocs/seo-structured-datafrom
copilot/sub-pr-934

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 2, 2026

Addresses two issues found during review of the JSON-LD structured data added to docs pages.

Changes

  • XSS fix: JSON.stringify passed directly to Astro's set:html doesn't escape </script>, which could allow premature script tag termination if any frontmatter contains that sequence. Fixed by sanitizing the output:
    set:html={JSON.stringify(schema).replace(/<\//g, "<\\/")}
  • FAQ content alignment: Hardcoded FAQ entries in Head.astro were drifted from the actual support/faq.md content — mismatched question phrasing and a missing entry ("Where can I follow active development?"). Updated all 14 entries to match the source page exactly.

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

…y in JSON-LD script injection

Co-authored-by: AvdLee <4329185+AvdLee@users.noreply.github.com>
Copilot AI changed the title [WIP] Add JSON-LD structured data to documentation pages Fix JSON-LD structured data: XSS escape and FAQ content alignment Mar 2, 2026
@AvdLee AvdLee closed this Mar 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants