Skip to content

Fix deep-inspection article quality: titles, i18n, CSP hashes, doc-analysis markup, lang switchers, ******#1081

Merged
pethers merged 2 commits intonews/deep-inspection-2026-03-12-betald-polisutbildning-1686e6c8ca78187bfrom
copilot/sub-pr-1080
Mar 12, 2026
Merged

Fix deep-inspection article quality: titles, i18n, CSP hashes, doc-analysis markup, lang switchers, ******#1081
pethers merged 2 commits intonews/deep-inspection-2026-03-12-betald-polisutbildning-1686e6c8ca78187bfrom
copilot/sub-pr-1080

Conversation

Copy link
Contributor

Copilot AI commented Mar 12, 2026

Review feedback on the paid police education deep-inspection PR identified generic titles, raw Markdown leaking into rendered HTML, broken language links pointing to non-existent files, script-src 'unsafe-inline' CSP, and incomplete Swedish translations. Also fixes a latent auth bug where legacy "******" config values were passed raw to the MCP gateway.

EN article

  • Title: "Deep Inspection: Policy Analysis" → "Deep Inspection: Paid Police Education Proposal" across <title>, og/twitter meta, <h1> ×2, JSON-LD headline, and BreadcrumbList
  • doc-analysis: Raw Markdown (# heading + duplicate [text](url) ×2) → <h4> + single <a>
  • h3: presstraff om forslag om betald polisutbildningPressträff om förslag om betald polisutbildning
  • hreflang + language switcher: Removed 12 non-existent alternates (da/nb/fi/de/fr/es/nl/ar/he/ja/ko/zh); kept en/sv/x-default
  • CSP: script-src 'unsafe-inline' → four sha256 hashes (anti-flash + 3× JSON-LD)

SV article

All EN fixes above, plus:

  • BreadcrumbList "Nyheter": index.htmlindex_sv.html
  • Reading time: 1 min read1 min läsning (body + twitter:data1)
  • Dashboard: All English labels/headings translated to Swedish
  • Mindmap: "Parliamentary Analysis" → Parlamentarisk analys, "Document Types" → Dokumenttyper, "Stakeholders" → Intressenter, "Policy Domains" → Policyområden

MCP auth — legacy Bearer prefix stripping

scripts/mcp-client/client.ts — Priority 4 path now strips prefix:

// before
if (authHeader) return authHeader; // Already includes "Bearer " prefix

// after
if (authHeader) return authHeader.replace(/^Bearer\s+/i, '');

JSDoc updated to remove the contradictory "requires a ******" statement.

scripts/mcp-setup.sh — robust case-insensitive strip via sed:

export MCP_AUTH_TOKEN="$(printf '%s' "$GW_KEY" | sed 's/^[Bb][Ee][Aa][Rr][Ee][Rr][[:space:]]*//')"

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

…g switchers, Bearer prefix

Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
Copilot AI changed the title [WIP] Add paid police education proposal article Fix deep-inspection article quality: titles, i18n, CSP hashes, doc-analysis markup, lang switchers, ****** Mar 12, 2026
@pethers pethers marked this pull request as ready for review March 12, 2026 11:51
@pethers pethers merged commit 6d676b0 into news/deep-inspection-2026-03-12-betald-polisutbildning-1686e6c8ca78187b Mar 12, 2026
@pethers pethers deleted the copilot/sub-pr-1080 branch March 12, 2026 11:51
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