get rid of control chars before returning the response