The safest route, if those posts really matter still, would be to edit them through UBB.threads when possible.
You could use PHPMyAdmin to build a list of posts (post_default_body cell) that have HTML in them (search for </a>), but I'd still advise against editing them through anything but UBB.threads.