Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
XSS Protection API 1.0.6
-
None
Description
For the cases when somebody tries to sanitise JSON strings the XSSAPI#encodeForJSString current implementation is too restrictive.
Assuming one would want to sanitize 2016-01-21T15:40:30, the output of the XSSAPI#encodeForJSString would be
2016\-01\-21T15:40:30
which although is a valid String for JavaScript code is not a valid one for JSON.