Sanitization, and Sample Policy

Sanitization, better javascript variable escaping, and correct policy
generation.