cleanup preparatory to handling HTML blocks