I routinely have to export ePubs from InDesign. I've been getting an error in boxes appearing correctly when I export my file to ePub. My colleague uses a Mac with the same export settings and doesn't get this same issue. After comparing the code of our files the only difference is that my class tags are being exported without 'x' characters, so 'box' comes through as 'bo ' (the x is being replaced by a space).
I've checked the class tags in InDesign and they're correct, so during the export process all 'x' characters are being stripped out of my class tags. 'x' characters are appearing fine in the body text.
Correctly working epub on the left, my export on the right, differences in bold: