Skip to content

fix(markdown): escape double quotes to " in inline styles#3570

Open
yashs33244 wants to merge 1 commit into
resend:canaryfrom
yashs33244:fix/markdown-style-double-quote-escape
Open

fix(markdown): escape double quotes to " in inline styles#3570
yashs33244 wants to merge 1 commit into
resend:canaryfrom
yashs33244:fix/markdown-style-double-quote-escape

Conversation

@yashs33244

@yashs33244 yashs33244 commented Jun 15, 2026

Copy link
Copy Markdown

parseCssInJsToInlineCss (used by the Markdown component to inline markdownCustomStyles into style="...") escaped a double quote " to ' — the HTML entity for an apostrophe, not a double quote. Any double-quoted style value (e.g. fontFamily: '"Times New Roman", serif', url("...")) was silently rewritten to apostrophes in the rendered HTML. The existing markdown snapshot had baked in the corrupted ' output, so it was shipping.

Fix: escape to ". Adds unit tests for the previously-untested util, updates the stale snapshot, and includes a patch changeset.

Full react-email unit suite passes (274 tests); pnpm typecheck clean; biome check clean on the changed files.


Summary by cubic

Fixes incorrect escaping of double quotes in Markdown inline styles. parseCssInJsToInlineCss now escapes " as " (not '), so quoted values in markdownCustomStyles render correctly.

  • Bug Fixes
    • Escape " to " in styles generated by parseCssInJsToInlineCss.
    • Add unit tests and refresh the Markdown snapshot.
    • Add a patch changeset for react-email.

Written for commit 3774e83. Summary will update on new commits.

Review in cubic

…quot;

escapeQuotes in parseCssInJsToInlineCss replaced a double quote with the
apostrophe entity ' instead of ". Any markdownCustomStyles value
containing a double quote (e.g. fontFamily: '"Times New Roman", serif')
was silently rewritten with apostrophes in the rendered style attribute.

Escape double quotes as " so the original value round-trips, and add
unit tests for the util. Updated the existing markdown snapshot that baked
in the old ' output.
Copilot AI review requested due to automatic review settings June 15, 2026 08:58
@vercel

vercel Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

@yashs33244 is attempting to deploy a commit to the resend Team on Vercel.

A member of the Team first needs to authorize it.

@changeset-bot

changeset-bot Bot commented Jun 15, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 3774e83

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
react-email Patch
@react-email/editor Patch
@react-email/ui Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 4 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Auto-approved: Bug fix escaping double quotes to " in inline CSS styles. Low-risk, well-tested change with updated snapshot and unit tests.

Re-trigger cubic

@github-actions github-actions Bot added the linear-synced PR has been synced to Linear label Jun 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

linear-synced PR has been synced to Linear

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants