Skip to content

Scheduling infrastructure for absolutely everyone.

fix: html render from calendar invite (#18577)

Praash7a8b9ededbf0
diff --git a/packages/lib/CalEventParser.ts b/packages/lib/CalEventParser.ts
index caf00bf44d1..53f24fa25d5 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<CalendarEvent, "description">, t:
if (!calEvent.description) {
return "";
}
+ const plainText = calEvent.description.replace(/<\/?[^>]+(>|$)/g, "").replace(/_/g, " ");
return `\n${t("description")}
- ${markdownToSafeHTML(calEvent.description)}
+ ${plainText}
`;
};
export const getLocation = (