Escaping special characters in the error message

I was getting an error that looked like this with an exception contains SQL output in it:

> SimpleXMLElement::addChild() [<a href='simplexmlelement.addchild'>simplexmlelement.addchild</a>]: unterminated entity reference &amp; visible = 1 &amp;&amp; tagged_contentforeign_type NOT IN ('daily_term', 'inspiration')

I figure this patch will help others who may have things in their errors that XML doesn't like.