refactor: render booking additional notes as plain text#28897
refactor: render booking additional notes as plain text#28897pedroccastro wants to merge 2 commits intomainfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe email template in 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
What does this PR do?
Removes the
formattedprop from the<Info>component used foradditionalNotesinBaseScheduledEmail. Theformattedprop converts the string to HTML viamarkdownToSafeHTMLand renders it throughdangerouslySetInnerHTML. ForadditionalNotes— which is user-entered free-form text — plain rendering is the safer and more predictable choice. Thedescriptionfield immediately above keepsformattedbecause event type descriptions are owner-controlled and already expected to be rendered markdown.Changes
BaseScheduledEmail.tsx: removeformattedfrom theadditionalNotes<Info>instanceContext
markdownToSafeHTMLalready usessanitize-htmlto strip dangerous elements, so this is not closing an exploit — it removes an unnecessary HTML rendering path for a field that is never authored as markdown.How should this be tested?
Manual
**bold**) → rendered as literal characters (expected after change)Mandatory Tasks