encodes xml entities