XSS remedy is a JavaScript library that protects against XSS attacks.  The XSS remedy library attempts to protect XSS attacks and the the primary defense mechanism to stop XSS is contextual output encoding/escaping., Supports for most common context targets in web applications (e.g. HTML, XML, CSS, JavaScript, URL Params).  It also provides a decode/unescape functions to the encoded strings. The unescape may require for many occasions For Example If you have to perform manipulations on actual text(eg: finding the length of the text) etc..