Skip to content

Fix stripped onclick warning on blog live-demo links - #5555

Merged
sumitshinde-84 merged 1 commit into
mainfrom
zj-fix-blog-live-demo-onclick
Aug 10, 2026
Merged

Fix stripped onclick warning on blog live-demo links#5555
sumitshinde-84 merged 1 commit into
mainfrom
zj-fix-blog-live-demo-onclick

Conversation

@ZJvandeWeg

Copy link
Copy Markdown
Member

Summary

  • Four July 2026 blog posts embedded raw HTML like <a onclick="capture('blog-live-demo', { reference: 'Blog: {{ title | escape }}' })"> — leftover 11ty/Nunjucks-style templating that never resolves under Nuxt's @nuxt/content/@nuxtjs/mdc pipeline (blog is fully migrated), and the onclick attribute itself gets stripped by MDC's sanitizer regardless, producing a build warning.
  • Added nuxt/components/content/LiveDemoLink.vue, a small MDC content component (same pattern as CtaImage.vue) that renders a plain <a> and fires capture('blog-live-demo', ...) via a real Vue @click handler.
  • Swapped the raw HTML in the four posts for :live-demo-link{href="..." label="..."} MDC syntax.

Test plan

  • Ran npm run dev:nuxt, confirmed the [@nuxtjs/mdc] removing unsafe attribute warning no longer appears
  • Fetched the rendered build-downtime-logger post and confirmed the link renders correctly with no onclick/unresolved template text
  • Sumit to confirm the demo links still track/behave as expected on the live posts

🤖 Generated with Claude Code

Raw HTML with onclick and unrendered {{ title | escape }} template
syntax in four blog posts triggered @nuxtjs/mdc's unsafe-attribute
sanitizer, since Nuxt Content renders these posts and doesn't run
Nunjucks. Added LiveDemoLink.vue, a content component that tracks the
click via a real Vue handler instead.
@netlify

netlify Bot commented Aug 10, 2026

Copy link
Copy Markdown

Deploy Preview for flowforge-website ready!

Name Link
🔨 Latest commit aa324ad
🔍 Latest deploy log https://app.netlify.com/projects/flowforge-website/deploys/6a79fa2094814d0007ecdbde
😎 Deploy Preview https://deploy-preview-5555--flowforge-website.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 64 (🔴 down 4 from production)
Accessibility: 96 (no change from production)
Best Practices: 100 (no change from production)
SEO: 92 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@sumitshinde-84
sumitshinde-84 merged commit 74f5c9e into main Aug 10, 2026
7 checks passed
@sumitshinde-84
sumitshinde-84 deleted the zj-fix-blog-live-demo-onclick branch August 10, 2026 18:39
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