handle escaped characters in XML elements