From 7a8b9ededbf0c930058db231e405ac6abe6a0ea5 Mon Sep 17 00:00:00 2001 From: Praash <99237795+Praashh@users.noreply.github.com> Date: Wed, 15 Jan 2025 02:10:31 +0530 Subject: [PATCH] fix: html render from calendar invite (#18577) --- packages/lib/CalEventParser.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/lib/CalEventParser.ts b/packages/lib/CalEventParser.ts index caf00bf44d..53f24fa25d 100644 --- a/packages/lib/CalEventParser.ts +++ b/packages/lib/CalEventParser.ts @@ -7,7 +7,6 @@ import type { CalendarEvent, Person } from "@calcom/types/Calendar"; import { WEBAPP_URL } from "./constants"; import getLabelValueMapFromResponses from "./getLabelValueMapFromResponses"; import isSmsCalEmail from "./isSmsCalEmail"; -import { markdownToSafeHTML } from "./markdownToSafeHTML"; const translator = short(); @@ -131,8 +130,9 @@ export const getDescription = (calEvent: Pick, t: if (!calEvent.description) { return ""; } + const plainText = calEvent.description.replace(/<\/?[^>]+(>|$)/g, "").replace(/_/g, " "); return `\n${t("description")} - ${markdownToSafeHTML(calEvent.description)} + ${plainText} `; }; export const getLocation = (