You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While it is possible to just copy the three files from sanitize.js to app/sanitizers/ (don't know why they are not included by default) it would be very useful to have those configurations in the global Sanitize object.
I know ember-sanitize is meant to be used as a template helper, but as it's already importing sanitize.js and it is possible to use the sanitizer from a Javascript file normally, for example to clean the user input before storing it in the database:
(If there is an easier way to use sanitize.js, please let me know)
By using files for configuration, every component/route/controller/service using the sanitizer would be required to navigate the paths to include the files (e.g. import basic from "../../../sanitizers/basic") with an added cost to maintain.
The text was updated successfully, but these errors were encountered:
I just realized that my last comment is wrong. From anywhere on an Ember app you can get to the app folder by using the app name, for example appname/sanitizers/basic.
I still believe it would be a good addition and potentially solve issues like #5
While it is possible to just copy the three files from sanitize.js to
app/sanitizers/
(don't know why they are not included by default) it would be very useful to have those configurations in the global Sanitize object.I know ember-sanitize is meant to be used as a template helper, but as it's already importing sanitize.js and it is possible to use the sanitizer from a Javascript file normally, for example to clean the user input before storing it in the database:
(If there is an easier way to use sanitize.js, please let me know)
By using files for configuration, every component/route/controller/service using the sanitizer would be required to navigate the paths to include the files (e.g. import basic from "../../../sanitizers/basic") with an added cost to maintain.
The text was updated successfully, but these errors were encountered: