The time to fix those was when you did the import. As someone who does a lot of migrations, people launching a forum with botched formatting like this is one of my greatest concerns. It would have been pretty easy to fix the import script, and much harder to fix post hoc now that you’ve launched. It would have been maybe an hour or two then, and now it’s 2-5X that much work.
Yeah, one could write a script that would clean the stuff up on the live forum and either (scary) don’t maintain the edits (so there would be no edit, and no notifications), or do the edit and tell it not to bump/notify. I’m pretty sure I’ve done it before. You would do something like:
fixes = Post.where("raw like '%something broken%'")
fixes.each do |p|
new_raw = p.raw.gsub!(some stuff)
PostRevisor.new(p).revise!(script_user, {raw: new_raw, edit_reason: 'post fixer!'}, {bypass_bump: true)
end
Does the raw have all of that HTML in it?