Encode xml characters

Without creating a config option, this should resolve the encoding issue.