Well, if you know the difference between valid and invalid codes, you can do a search and replace within your database to change them. For instance, if the issue is something like changing
then do a search and replace for that code and change it. That's an easy one, but think about what you can do with a search and replace within the database. BACKUP first, of course.
The problem gets more complicated when it comes to graphics. Unless you have some consistent code with graphics, it's hard to fix them by search and replace. That's a manual job.
By the way, what is it about your blockquote, as an example, that wouldn't validate?