It's quite possible this an issue with SwiftSoup's serialization as I'm pretty sure we're not mapiulating the HTML directly.