Skip to content

Commit

Permalink
feat: Disables HTML rendering in Toast by default (#21853)
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-s-molina authored Oct 19, 2022
1 parent 0a4ecca commit 47b1e0c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion superset-frontend/src/components/MessageToasts/Toast.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 2 additions & 0 deletions superset-frontend/src/components/MessageToasts/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

0 comments on commit 47b1e0c

Please sign in to comment.