Escaping special characters (') in generated js strings