How to Sanitize user provided input in javascript without any libraries like DOMpurify I am using this following piece of code in my script.