Added support for XML entity references