Notify API additional attributes
-
We would really appreciate if we could have apart from “message” attribute the “title” attribute for Notify API like we have in the dialog.
this.$q.notify({ title: 'Alert', message: 'test', textColor: "warning", icon: "error" });
Vice versa it would be nice to have some attributes of the dialog API like icon , textColor in Notify API.
-
You could just use the dialog. Can’t you?
https://codepen.io/smolinari/pen/dyyrxqj?editors=1010
Scott
-
Thanks. Yes I know. But I would like to use Notify plugin.
-
@Cobeland you can use https://quasar.dev/quasar-plugins/notify#Using-HTML to get what you want, on dialog you can use custom component https://quasar.dev/quasar-plugins/dialog#Invoking-custom-component. You can achieve these already, it’s just a matter of doing so.
-
Thanks, but I wanted to avoid to use html where it’s not necessary due to vulnerabilitiy.
I think this is a kind of feature request? Or is there a workaround? -
Where is there a vulnerability? It’s your html, not user created. Or, will it be user created?
Scott
-
Yes its partly user created and thus a candidate for vulnerability. Only a few attributes (similar to the dialog) could solve the problem.
-
Does Quasar offers some html ‘sanitizing functionalities’ or what is the recommended approach for using user defined HTML.
The easiest way in regard of dialog and notify plugins would be to harmonize attributes (like message, title, icon) etc.