-
Notifications
You must be signed in to change notification settings - Fork 751
Bug Fix (Render): Handles incorrect rendering of quotes with HTML exports #1958
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: canary
Are you sure you want to change the base?
Conversation
…1749) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: gabriel miranda <gabrielmfern@outlook.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Bu Kinoshita <6929565+bukinoshita@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: gabriel miranda <gabrielmfern@outlook.com>
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: gabriel miranda <gabrielmfern@outlook.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…send#1951) Co-authored-by: gabriel miranda <gabrielmfern@outlook.com>
|
@TamS129 is attempting to deploy a commit to the resend Team on Vercel. A member of the Team first needs to authorize it. |
}); | ||
} | ||
else if(search3){ | ||
console.log('Ampbersand Detected.'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a small typo in the console.log message - "Ampbersand" should be spelled "Ampersand".
console.log('Ampbersand Detected.'); | |
console.log('Ampersand Detected.'); |
Spotted by Diamond
Is this helpful? React 👍 or 👎 to let us know.
ceeaf0d
to
e7c671a
Compare
4451205
to
89ffd8c
Compare
c740494
to
b114121
Compare
643b95a
to
35a000c
Compare
Related Tickets and Documents:
React-Email GitHub Issue #1767
Description
When rendering components which contain a style tag that indicates a font with quotation marks in its name, the quotation marks are replaced with an escape character. These characters vary by component, but are similar to “"”. Because of this, the font may fail to load in the browser, giving typefaces involved in the component an unintended appearance.
Our solution to this problem is to parse the html output and replace occurrences of the """ character with single quotations. Our fix specifically targets the style attribute within the html tags to fix the incorrect rendering. For example:
Before Changes
<body style="font-family:"Helvetica Neue", Helvetica, Arial, sans-serif"></body>
After Changes
<body style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif"></body>
Explanation of Changes
Our code takes the html output from render and runs it through a conditional test before return the document. The conditional checks if these escape characters are present in the style attribute and the href attribute mentioned within the comments of the issue. If one of these characters is within our code, it is replaced with a ' or & respectively.