Excaping unwanted xml characters

<> & etc. broke xml in previous version. Added a function to escape
them. Thats it!