thanks for the reply well probabbly I should explain more. this is part of an email . after the mta delivers the email, it is stored in a local dir. After that the email is being parsed by the parser inside an web based imap client at display time.
I dont think I have the choice of rewriting the message!? and I dont want to reject the message alltogether. I can either 1-fix the incoming html by tidying it up or 2- strip only plain text out and dispaly that you have spam, 3 - or ignore that mal-formatted tag and display the rest -- http://mail.python.org/mailman/listinfo/python-list