Skip to content

Commit

Permalink
Atomic: Render eligibility warnings as HTML (#94990)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmtr authored Sep 30, 2024
1 parent 8d2712e commit 4a7f165
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion client/blocks/eligibility-warnings/warning-list.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Card, Badge } from '@automattic/components';
import DOMPurify from 'dompurify';
import { localize, LocalizeProps, translate } from 'i18n-calypso';
import { Fragment } from 'react';
import ActionPanelLink from 'calypso/components/action-panel/link';
Expand Down Expand Up @@ -40,7 +41,9 @@ export const WarningList = ( { context, translate, warnings, showContact = true
</Fragment>
) }
<span className="eligibility-warnings__message-description">
<span>{ description } </span>
<span
dangerouslySetInnerHTML={ { __html: DOMPurify.sanitize( description ) } } // eslint-disable-line react/no-danger
/>
{ domainNames && displayDomainNames( domainNames ) }
{ supportUrl && (
<ExternalLink href={ supportUrl } target="_blank" rel="noopener noreferrer">
Expand Down

0 comments on commit 4a7f165

Please sign in to comment.