-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Labels
[Package] Components/packages/components/packages/components[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Description
Description
__unstableHTML works for generic notices, but it doesn't seem to apply to snackbar, even though it's listed as an option in the docs.
E.g.
if ( val.indexOf( '<a' ) > -1 ) {
dispatch( 'core/notices' ).createNotice(
'warning',
`<strong>Illegal Tags</strong>Removed embedded link in button text: ${ val }`,
{
type: 'snackbar',
isDismissible: true,
__unstableHTML: true,
},
);
}
Spits out html as string.
Omitting the type:'snackbar' argument results in:

(which, admittedly, doesn't do exactly what i need it to in this screenshot, but you get the drift)
Can even replicate in storybook https://wordpress.github.io/gutenberg/?path=/docs/components-snackbar--docs -

Step-by-step reproduction instructions
Create a snackbar notice
Use HTML in string, add __unstableHTML flag
???
Screenshots, screen recording, code snippet
No response
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
[Package] Components/packages/components/packages/components[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Type
Fields
Give feedbackNo fields configured for issues without a type.
