fix(markdown): escape double quotes to " in inline styles#3570
Open
yashs33244 wants to merge 1 commit into
Open
fix(markdown): escape double quotes to " in inline styles#3570yashs33244 wants to merge 1 commit into
yashs33244 wants to merge 1 commit into
Conversation
…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.
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 detectedLatest commit: 3774e83 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
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 |
Contributor
There was a problem hiding this comment.
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
parseCssInJsToInlineCss(used by theMarkdowncomponent to inlinemarkdownCustomStylesintostyle="...") 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 apatchchangeset.Full
react-emailunit suite passes (274 tests);pnpm typecheckclean;biome checkclean on the changed files.Summary by cubic
Fixes incorrect escaping of double quotes in Markdown inline styles.
parseCssInJsToInlineCssnow escapes"as"(not'), so quoted values inmarkdownCustomStylesrender correctly."to"in styles generated byparseCssInJsToInlineCss.react-email.Written for commit 3774e83. Summary will update on new commits.