url encode

Encoding special characters in the "loc" element to correct the EntityRef: expecting ';' problem