If value in the mobi file is html escaped you need to unescape it using HTML rules for processing and then escape it according XML rules when writing to XML file. As you do.
My statement was: you can't unescape "just in case" (because no harm was done.)
If metadata has escaped strings we have to unescape them.
If it has none-escaped strings we shouldn't do this.