diff --git a/packages/lib/markdownToSafeHTML.ts b/packages/lib/markdownToSafeHTML.ts
index b805b1a335..e6de95bd7a 100644
--- a/packages/lib/markdownToSafeHTML.ts
+++ b/packages/lib/markdownToSafeHTML.ts
@@ -1,6 +1,5 @@
-import sanitizeHtml from "sanitize-html";
-
import { md } from "@calcom/lib/markdownIt";
+import sanitizeHtml from "sanitize-html";
if (typeof window !== "undefined") {
// This file imports markdown parser which is a costly dependency, so we want to make sure it's not imported on the client side.
@@ -24,7 +23,9 @@ export function markdownToSafeHTML(markdown: string | null) {
/
/g,
""
)
- .replace(/")
+ .replace(/]*>/g, "");
// Match:
- Some text
// Convert to: - Some text
@@ -34,4 +35,4 @@ export function markdownToSafeHTML(markdown: string | null) {
);
return safeHTMLWithListFormatting;
-}
+}
\ No newline at end of file
diff --git a/packages/lib/markdownToSafeHTMLClient.ts b/packages/lib/markdownToSafeHTMLClient.ts
index 434f4aa9c8..4e35f5467b 100644
--- a/packages/lib/markdownToSafeHTMLClient.ts
+++ b/packages/lib/markdownToSafeHTMLClient.ts
@@ -1,6 +1,5 @@
-import DOMPurify from "dompurify";
-
import { md } from "@calcom/lib/markdownIt";
+import DOMPurify from "dompurify";
if (typeof window == "undefined") {
console.warn(
@@ -24,7 +23,9 @@ export function markdownToSafeHTMLClient(markdown: string | null) {
//g,
""
)
- .replace(/")
+ .replace(/]*>/g, "");
// Match:
- Some text
or
// Convert to: - Some text