feat: advanced tab platform wrapper (#16941)

* fixed error in advanced tab atom build

-- used `DOMPurify` instead of `sanitize-html`

* hide BookerLayoutSelector for platform and removePlatformClientIdFromEmail

* fixup! Merge branch 'main' into event-advanced-platform-wrapper

* undo linting changes

* undo linting changes

* fix: active state of tabs items

---------

Co-authored-by: Morgan <[email protected]>
Co-authored-by: Morgan Vernay <[email protected]>
This commit is contained in:
authored and GitHub committed 2024-10-10 17:09:03 +03:00
1 parent 1f08bc5a4f
commit 99caae8665
17 files changed
+208 -101

No files matched your search

@@ -7,7 +7,7 @@ import type { z } from "zod";
import { classNames } from "@calcom/lib";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { md } from "@calcom/lib/markdownIt";
import { markdownToSafeHTML } from "@calcom/lib/markdownToSafeHTML";
import { markdownToSafeHTMLClient } from "@calcom/lib/markdownToSafeHTMLClient";
import turndown from "@calcom/lib/turndownService";
import {
Badge,
@@ -153,7 +153,7 @@ export const FormBuilder = function FormBuilder({
}
if (fieldsThatSupportLabelAsSafeHtml.includes(field.type)) {
field = { ...field, labelAsSafeHtml: markdownToSafeHTML(field.label ?? "") };
field = { ...field, labelAsSafeHtml: markdownToSafeHTMLClient(field.label ?? "") };
}
const numOptions = options?.length ?? 0;
const firstOptionInput =
@@ -692,7 +692,7 @@ function FieldLabel({ field }: { field: RhfFormField }) {
<span
dangerouslySetInnerHTML={{
// Derive from field.label because label might change in b/w and field.labelAsSafeHtml will not be updated.
__html: markdownToSafeHTML(field.label || "") || t(field.defaultLabel || ""),
__html: markdownToSafeHTMLClient(field.label || "") || t(field.defaultLabel || ""),
}}
/>
);