Describe the bug
i just try to made js block for gutenberg i face sanitation issue . There is much more opportunity for xss attack. so i just want to know how we solve sanitization issue before saving into database.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
sanitize and validate the code before saving in to db.
Vedio
https://www.useloom.com/share/754df9cfe3244e8298351b675b855cee
Desktop (please complete the following information):
I tested with WordPress 4.9.7 and Gutenberg 3.2.0 and found that the post looked blank with the following errors in the console after following the steps provided. Notes: in step 4 I clicked "Save Draft" and in step 5 I simply refreshed the page.
TypeError: Cannot read property 'push' of undefined
react-dom.min.82e21c65.js:110
Uncaught (in promise) TypeError: Cannot read property 'push' of undefined
index.js?ver=1531165082:2

Seen at http://alittletestblog.com/wp-admin/post.php?post=13887&action=edit running WordPress 4.9.7 and Gutenberg 3.2.0 using Chrome 67.0.3396.99 on macOS 10.13.5.
Additional notes:
unfiltered_html).
- Requires administrator role (specifically unfiltered_html).
- No different than pasting the same stuff in HTML tab of the classic editor.
- Gutenberg doesn't allow any more than what鈥檚 already possible through the REST API alone.
Per these notes, closing this.
Most helpful comment
Per these notes, closing this.