cleanup dom in task output