feat: Disables HTML rendering in Toast by default (#21853)

This commit is contained in:
Michael S. Molina 2022-10-19 07:44:50 -03:00 committed by GitHub
parent 0a4ecca9f2
commit 47b1e0ca9d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -97,7 +97,7 @@ export default function Toast({ toast, onCloseToast }: ToastPresenterProps) {
role="alert"
>
{icon}
<Interweave content={toast.text} />
<Interweave content={toast.text} noHtml={!toast.allowHtml} />
<i
className="fa fa-close pull-right pointer"
role="button"

View File

@ -31,4 +31,6 @@ export interface ToastMeta {
/** Whether to skip displaying this message if there are another toast
* with the same message. */
noDuplicate?: boolean;
/** For security reasons, HTML rendering is disabled by default. Use this property to enable it. */
allowHtml?: boolean;
}