Fixing issue with replaceDataWithicons, where we parse data with
DOMDocument loadXML to detect if it has anchor tags in it, was tossing
warnings if data contained &'s (entity ref, expecting ;).  So run data
through htmlspecialchars() before doing loadXML instead of after.