Sanitize text before inserting it to DOM Text to insert Test bold italic stroke underscore Which tags do you want to allow? Allow all (will remove script tag only) img i b a u ul li Sanitize Result: