On Apr 8, 2014, at 7:38 PM, Kevin Mcintyre <kebin70@gmail.com> wrote:

I've opted for placeholder and added callback to flatten.

I'm a hack, and it was holding up delivery of email.

What I would do is use html5lib to parse the HTML, then emit it as HTML before re-parsing it as XML.

XMLString is designed to read templates written by a programmer, not arbitrary garbage HTML off the internet.  There are other libraries for that :-).

-glyph