Sanitize html on client



I am using djedi:sanitize-html to sanitize the user submitted html (from summernote) on server before I store it in database. But because I need to give the user the possibility to “preview” de form before submitting it how should I sanitize summernote’s html on client?

thanks a lot.


I have just tested and it seems that vazco:universe-html-purifier package can work both on client and server. So, I guess I will use this package and will solve my issue.