-
Notifications
You must be signed in to change notification settings - Fork 10.2k
fix: convert BR tags to proper markdown line breaks in event description #22682
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: main
Are you sure you want to change the base?
fix: convert BR tags to proper markdown line breaks in event description #22682
Conversation
…ions - Changed <br> tags to convert to ' \n' (markdown soft break) instead of literal '<br>' - Changed <p><br></p> to convert to '\n\n' (markdown paragraph break) - Added cleanup for excessive newlines and trailing whitespace - Fixes validation errors when event descriptions contain line breaks This ensures HTML tags are not preserved in markdown content, preventing "The request failed schema validation" errors. Fixes calcom#22681
@rahulrshetty45 is attempting to deploy a commit to the cal Team on Vercel. A member of the Team first needs to authorize it. |
WalkthroughThe changes update the post-processing logic in the Estimated code review effort2 (~15 minutes) Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
packages/lib/turndownService.tsOops! Something went wrong! :( ESLint: 8.57.1 ESLint couldn't find the plugin "eslint-plugin-playwright". (The package "eslint-plugin-playwright" was not found when loaded as a Node module from the directory "".) It's likely that the plugin isn't installed correctly. Try reinstalling by running the following:
The plugin "eslint-plugin-playwright" was referenced from the config file in ".eslintrc.js". If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
📓 Path-based instructions (1)**/*.{js,jsx,ts,tsx}📄 CodeRabbit Inference Engine (.cursor/rules/review.mdc)
Files:
🧰 Additional context used📓 Path-based instructions (1)**/*.{js,jsx,ts,tsx}📄 CodeRabbit Inference Engine (.cursor/rules/review.mdc)
Files:
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
🔇 Additional comments (3)
✨ Finishing Touches
🪧 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 (
|
Graphite Automations"Add consumer team as reviewer" took an action on this PR • (07/23/25)1 reviewer was added to this PR based on Keith Williams's automation. "Add community label" took an action on this PR • (07/23/25)1 label was added to this PR based on Keith Williams's automation. |
Hi @rahulrshetty45, Thanks for the PR. Could you pls attach a loom video showing before and after your fix? |
This PR is being marked as stale due to inactivity. |
fix: convert BR tags to proper markdown line breaks in event descriptions
This ensures HTML tags are not preserved in markdown content, preventing "The request failed schema validation" errors.
Fixes #22681
What does this PR do?
This PR fixes a validation error that occurs when event descriptions contain
tags. The turndown service was preserving
tags as literal HTML strings within markdown content, which was
causing schema validation failures. Now, these tags are properly converted to markdown-compliant line breaks.
Visual Demo (For contributors especially)
Image Demo (if applicable):
Before: When users press Shift+Enter in the editor, it creates
tags that get sent as "Line 1
Line 2" causing validation errors.
After: The same input is now converted to proper markdown: "Line 1 \nLine 2" (two spaces + newline), which passes validation.
Mandatory Tasks (DO NOT REMOVE)
How should this be tested?
Alternative test:
Checklist
Fixes #22681