Skip to content

fix(starter): check-dist reads CSS url() for WordPress site paths; JSON-LD is not runtime - #753

Merged
ABB65 merged 1 commit into
mainfrom
t7/check-dist-style-ldjson
Nov 7, 2026
Merged

ABB65 merged 1 commit into
mainfrom
t7/check-dist-style-ldjson

Conversation

@ABB65

@ABB65 ABB65 commented Nov 7, 2026

Copy link
Copy Markdown
Member

What

A follow-up to #752, from its review.

  • CSS url(): scripts/check-dist.mjs reads url() addresses in style attributes (entity-quoted) and in <style> elements. A site path (relative or root) into wp-content / wp-includes / wp-json fails the page. fix(starter): check-dist flags WordPress runtime, not links to other sites; knip keeps social.ts #752's attribute-only check had let it pass silently. A url() pointing to another site passes.
  • JSON-LD: the inline-script check skips application/ld+json, as the page's script filter already does. JSON-LD names addresses but loads none, so an image on another site's wp-content passes there, as it does in og:image.

Checked

On a migrated site's build (245 pages):

  • clean build: 0 failures;
  • with injected markup on one page:
Injected Result
style="background:url(&quot;/wp-content/…&quot;)" fails
<style>…url(/wp-content/themes/…)</style> fails
style="…url(https://other.org/wp-content/…)" passes
JSON-LD image on another site's wp-content passes
jQuery script from wp-includes still fails
inline fetch("/wp-json/…") still fails

pnpm lint 0, typecheck (hook) 0. The starter is not a workspace package, so there is no changeset.

…ON-LD is not runtime

Follow-up to #752 (review). A site path into wp-content inside a style attribute or a <style>
element is checked again: it was caught by the old whole-page match and passed silently after
#752. JSON-LD names addresses and loads none, so an image on another site's wp-content there
passes, as it does in og:image.
@netlify

netlify Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for contentrain-ai ready!

Name Link
🔨 Latest commit d92f785
🔍 Latest deploy log https://app.netlify.com/projects/contentrain-ai/deploys/6aef14cce97f6bc36e4f36dc
😎 Deploy Preview https://deploy-preview-753--contentrain-ai.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

@ABB65
ABB65 merged commit e750936 into main Nov 7, 2026
8 checks passed
@ABB65
ABB65 deleted the t7/check-dist-style-ldjson branch November 7, 2026 12:09
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 7, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant