I think my first stab would be to reimplement it as a series of `content_tag`s. It'll end up being a bit more verbose, but there's less risk of invalid HTML creeping into something a little more structured.