If you need squeaky clean HTML output, I suggest looking into the use of MultiMarkdown, which allows structural exporting. The HTML exporter that Scrivener uses is simply one of the methods Apple provides. For matching the looks of an RTF file as closely as possible, it does all right, but anybody that knows anything about HTML code would grimace at what it puts out.
The XHTML that comes out of MMD is extremely clean, and easy to style (by default it exports with a stylesheet that attempts to match your Scrivener export settings – but this stylesheet can be easily removed and replaced with your website’s styles).
The biggest drawback to using MMD is you’ll have to forsake the easy bold and italic formatting allowed by Scrivener, and use the simple Markdown approach. If this is a route you would consider taking, Scrivener does include a handy tool which will convert most RTF bold and italic ranges to MMD syntax.
But yes, other than totally switching work flows, seach and replace is your best option. You might scope around on the Web, it could be that some other person equally dissatisfied with Apple’s HTML exporter has written a little program to clean up its mess.
Thanks for fielding this, Amber. Indeed, Scrivener just uses the standard HTML output. I hear that this may improve in Leopard, but I’m not sure…
Best,
Keith
Well, I grimace whenever I look at the results, but I am a NeatFreak and having hundreds of styles all doing nearly the same things instead of clear structure make me weep. Granted, it is not as bad as it could be. At least it is styles and not fonts and tables!