add id to checkboxes and use proper escaping