<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Apr 8, 2014, at 7:38 PM, Kevin Mcintyre <<a href="mailto:kebin70@gmail.com">kebin70@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">I've opted for placeholder and added callback to flatten.<br><br></div><span style="font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;">I'm a hack, and it was holding up delivery of email.</span></blockquote></div><br><div>What I would do is use html5lib to parse the HTML, then emit it as HTML before re-parsing it as XML.</div><div><br></div><div>XMLString is designed to read templates written by a programmer, not arbitrary garbage HTML off the internet.  There are other libraries for that :-).</div><div><br></div><div>-glyph</div><div><br></div></body></html>