FIX(MAIL): transform YouTube iframe to clickable link in emails#1079
FIX(MAIL): transform YouTube iframe to clickable link in emails#1079vagxrth wants to merge 4 commits intoMail-0:stagingfrom vagxrth:staging
Conversation
…validation and URL encoding
FIX(MAIL): transform YouTube iframe to clickable link in emails
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
this was a bug, youtube videos were never meant to be rendered in the message compose box |
|
Yeah cool, understood thanks a lot!
|
Description
This pull request addresses an issue where YouTube links pasted into the email composer, which were displayed as embedded video previews, were not being included in the sent email, either as an embed or a clickable link.
The fix involves the following:
iframeembeds within the email body are now transformed into standard HTML anchor (<a>) tags. These links point directly to the YouTube video.transformYouTubeIframesToLinks, located inemail-utils.ts.srcattributes, whitespace variations, and self-closing iframe tags.encodeURIComponent, and the final URL is HTML-escaped before being embedded in the anchor tag to enhance security and prevent potential XSS vulnerabilities or malformed links.Type of Change
Please delete options that are not relevant.
Areas Affected
Please check all that apply:
Testing Done
Describe the tests you've done:
Security Considerations
For changes involving data or authentication:
Checklist
Screenshots/Recordings
before.mov
after.mov
By submitting this pull request, I confirm that my contribution is made under the terms of the project's license.