Working on helper function to easily sanitize all forms out output be it inside JS or Textarea or html.
Planning to base off wordpress esc_* functions which work quite well.
This code came from in whole or partially from the following places
WordPress: http://core.trac.wordpress.org/
OWASP: https://www.owasp.org/index.php/Category:OWASP_Enterprise_Security_API