updated cleanHTML routine