FAIL :-P
AFAIK You need to JS escape anything that goes into a JS context too.
In inline script you need to get JS string escaping right and avoid </ sequence that ends HTML CDATA.
FAIL :-P
AFAIK You need to JS escape anything that goes into a JS context too.