I don't have a Mac, but I was able to reproduce the problem with an epub file generated by Pages for iOS 4.1. (The source was
Kovid Goyal's docx test file.)
Apparently Pages adds an onload Javascript attribute to all <body> tags.
A typical HTML file looks like this:
After selecting Mend & Prettify Code, it looks like this: