Escape characters for valid XML