Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Disables HTML rendering in Toast by default #21853

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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;
}