process html to extract text part and possible images