Scheduling infrastructure for absolutely everyone.
Properly replace a link tags
nicolas39f16d95cb77
diff --git a/lib/emails/helpers.ts b/lib/emails/helpers.tsindex e5218a0a06e..929a0556b63 100644--- a/lib/emails/helpers.ts+++ b/lib/emails/helpers.ts@@ -25,5 +25,9 @@ export function getFormattedMeetingId(videoCallData: VideoCallData): string {}export function stripHtml(html: string): string {- return html.replace("<br />", "\n").replace(/<[^>]+>/g, "");+ const aLinkRegExp = /<a[\s\w="_:#;]*href="([^<>"]*)"[\s\w="_:#;]*>([^<>]*)<\/a>/g;+ return html+ .replace("<br />", "\n")+ .replace(aLinkRegExp, "$2: $1")+ .replace(/<[^>]+>/g, "");}