Render HTML in description of active payment integrations (https://github.com/woocommerce/woocommerce-blocks/pull/7313)

This commit is contained in:
Niels Lange 2022-10-06 23:52:42 +07:00 committed by GitHub
parent aefcf65dd8
commit 5fe9de69f6
1 changed files with 7 additions and 3 deletions

View File

@ -4,6 +4,7 @@
import { __ } from '@wordpress/i18n';
import { Icon, external } from '@wordpress/icons';
import { VisuallyHidden } from '@wordpress/components';
import { sanitizeHTML } from '@woocommerce/utils';
/**
* Internal dependencies
@ -37,9 +38,12 @@ const ExternalLinkCard = ( {
{ title }
</strong>
{ description && (
<span className="wc-block-editor-components-external-link-card__description">
{ description }
</span>
<span
className="wc-block-editor-components-external-link-card__description"
dangerouslySetInnerHTML={ {
__html: sanitizeHTML( description ),
} }
></span>
) }
</span>
<VisuallyHidden as="span">