chore: add biome-ignore comments for dangerouslySetInnerHTML (#26848)
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
ff65dee89f
commit
f5cd2342c7
27 files changed
+28
No files matched your search
@@ -67,6 +67,7 @@ function SingleAppPage(props: AppDataProps) {
|
||||
body={
|
||||
<>
|
||||
{ }
|
||||
{/* biome-ignore lint/security/noDangerouslySetInnerHtml: Content is sanitized via markdownToSafeHTML */}
|
||||
<div dangerouslySetInnerHTML={{ __html: markdownToSafeHTML(source.content) }} />
|
||||
</>
|
||||
}
|
||||
|
||||
@@ -127,6 +127,7 @@ export function AppCard({ app, credentials, searchText, userAdminTeams }: AppCar
|
||||
<span>{props.rating} stars</span> <Icon name="star" className="ml-1 mt-0.5 h-4 w-4 text-yellow-600" />
|
||||
<span className="pl-1 text-subtle">{props.reviews} reviews</span>
|
||||
</div> */}
|
||||
{/* biome-ignore lint/security/noDangerouslySetInnerHtml: Content is sanitized via markdownToSafeHTML */}
|
||||
<p
|
||||
className="text-default mt-2 grow text-sm"
|
||||
dangerouslySetInnerHTML={{ __html: markdownToSafeHTML(app.description) }}
|
||||
|
||||
@@ -179,6 +179,7 @@ export const EventMeta = ({
|
||||
<ScrollableWithGradients
|
||||
className="wrap-break-word scroll-bar max-h-[180px] max-w-full overflow-y-auto pr-4"
|
||||
ariaLabel={t("description")}>
|
||||
{/* biome-ignore lint/security/noDangerouslySetInnerHtml: Content is sanitized via markdownToSafeHTMLClient */}
|
||||
<div
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: markdownToSafeHTMLClient(translatedDescription ?? event.description),
|
||||
|
||||
@@ -775,6 +775,7 @@ export default function Success(props: PageProps) {
|
||||
|
||||
return (
|
||||
<Fragment key={field.name}>
|
||||
{/* biome-ignore lint/security/noDangerouslySetInnerHtml: Content is sanitized via markdownToSafeHTML */}
|
||||
<div
|
||||
className="text-emphasis mt-4 font-medium"
|
||||
dangerouslySetInnerHTML={{
|
||||
|
||||
@@ -264,6 +264,7 @@ const OtherTeamProfileView = () => {
|
||||
{team && !isBioEmpty && (
|
||||
<>
|
||||
<Label className="text-emphasis mt-5">{t("about")}</Label>
|
||||
{/* biome-ignore lint/security/noDangerouslySetInnerHtml: Content is sanitized via markdownToSafeHTML */}
|
||||
<div
|
||||
className=" text-subtle wrap-break-word text-sm [&_a]:text-blue-500 [&_a]:underline [&_a]:hover:text-blue-600"
|
||||
|
||||
|
||||
@@ -163,6 +163,7 @@ const OrgProfileView = ({
|
||||
{!isBioEmpty && (
|
||||
<>
|
||||
<Label className="text-emphasis mt-5">{t("about")}</Label>
|
||||
{/* biome-ignore lint/security/noDangerouslySetInnerHtml: Content is sanitized via markdownToSafeHTML */}
|
||||
<div
|
||||
className=" text-subtle wrap-break-word text-sm [&_a]:text-blue-500 [&_a]:underline [&_a]:hover:text-blue-600"
|
||||
dangerouslySetInnerHTML={{
|
||||
|
||||
@@ -169,6 +169,7 @@ const ProfileView = () => {
|
||||
{team && !isBioEmpty && (
|
||||
<>
|
||||
<Label className="text-emphasis mt-5">{t("about")}</Label>
|
||||
{/* biome-ignore lint/security/noDangerouslySetInnerHtml: Content is sanitized via markdownToSafeHTML */}
|
||||
<div
|
||||
className=" text-subtle wrap-break-word text-sm [&_a]:text-blue-500 [&_a]:underline [&_a]:hover:text-blue-600"
|
||||
dangerouslySetInnerHTML={{ __html: markdownToSafeHTML(team.bio ?? null) }}
|
||||
|
||||
@@ -58,6 +58,7 @@ export const EventTypeDescription = ({
|
||||
shortenDescription ? "line-clamp-4 [&>*:not(:first-child)]:hidden" : ""
|
||||
)}
|
||||
// eslint-disable-next-line react/no-danger
|
||||
// biome-ignore lint/security/noDangerouslySetInnerHtml: Content is sanitized via markdownToSafeHTML
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: markdownToSafeHTML(eventType.descriptionAsSafeHTML || ""),
|
||||
}}
|
||||
|
||||
@@ -891,6 +891,7 @@ function FieldLabel({ field }: { field: RhfFormField }) {
|
||||
if (!fieldTypeConfigVariants || !variantsConfig) {
|
||||
if (fieldsThatSupportLabelAsSafeHtml.includes(field.type)) {
|
||||
return (
|
||||
// biome-ignore lint/security/noDangerouslySetInnerHtml: Content is sanitized via markdownToSafeHTMLClient
|
||||
<span
|
||||
dangerouslySetInnerHTML={{
|
||||
// Derive from field.label because label might change in b/w and field.labelAsSafeHtml will not be updated.
|
||||
|
||||
@@ -328,6 +328,7 @@ export default function Signup({
|
||||
<>
|
||||
{process.env.NEXT_PUBLIC_GTM_ID && (
|
||||
<>
|
||||
{/* biome-ignore lint/security/noDangerouslySetInnerHtml: GTM script injection */}
|
||||
<Script
|
||||
id="gtm-init-script"
|
||||
// It is strictly not necessary to disable, but in a future update of react/no-danger this will error.
|
||||
@@ -341,6 +342,7 @@ export default function Signup({
|
||||
})(window, document, 'script', 'dataLayer', '${process.env.NEXT_PUBLIC_GTM_ID}');`,
|
||||
}}
|
||||
/>
|
||||
{/* biome-ignore lint/security/noDangerouslySetInnerHtml: GTM noscript fallback */}
|
||||
<noscript
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: `<iframe src="https://www.googletagmanager.com/ns.html?id=${process.env.NEXT_PUBLIC_GTM_ID}" height="0" width="0" style="display:none;visibility:hidden"></iframe>`,
|
||||
|
||||
@@ -154,6 +154,7 @@ function TeamPage({ team, considerUnpublished, isValidOrgDomain }: PageProps) {
|
||||
</p>
|
||||
{!isBioEmpty && (
|
||||
<>
|
||||
{/* biome-ignore lint/security/noDangerouslySetInnerHtml: Content is sanitized via safeBio */}
|
||||
<div
|
||||
className=" text-subtle wrap-break-word text-sm [&_a]:text-blue-500 [&_a]:underline [&_a]:hover:text-blue-600"
|
||||
dangerouslySetInnerHTML={{ __html: team.safeBio }}
|
||||
|
||||
@@ -97,6 +97,7 @@ export function UserPage(props: PageProps) {
|
||||
</h1>
|
||||
{!isBioEmpty && (
|
||||
<>
|
||||
{/* biome-ignore lint/security/noDangerouslySetInnerHtml: Content is sanitized via safeBio */}
|
||||
<div
|
||||
className="text-default wrap-break-word text-sm [&_a]:text-blue-500 [&_a]:underline [&_a]:hover:text-blue-600"
|
||||
dangerouslySetInnerHTML={{ __html: props.safeBio }}
|
||||
|
||||
@@ -608,6 +608,7 @@ export function VideoMeetingInfo(props: VideoMeetingInfo) {
|
||||
<>
|
||||
<h3>{t("description")}:</h3>
|
||||
|
||||
{/* biome-ignore lint/security/noDangerouslySetInnerHtml: Content is sanitized via markdownToSafeHTML */}
|
||||
<div
|
||||
className="prose-sm prose prose-invert"
|
||||
dangerouslySetInnerHTML={{ __html: markdownToSafeHTML(booking.description) }}
|
||||
|
||||
Reference in new issue
Block a user