using something like the JSON filter (which may not be available in this context?) is techincally correct, since JSON is guaranteed to be valid js.