Yes "&" is a reserved character in xml like the content.opf. It therefore needs to be escaped and Sigil does that for the main entries.
But using an "&" in the opf:file-as attribute is what triggers the bug in Sigil. If you remove the "&" in opf:file-as and replace it with another character to indicate concatenation (such as a ";") all will work just fine.
When multiple authors are used in one file-as, the file-as attribute is typically set to using the lead authors name in last, first order (effectively you can not file it under both names with one entry but you can file it under a concatenated string).
I have now updated the code in Sigil so that using an "&" in the opf:file-as (or any attribute) will properly escape the "&" and allow things to work. The bug fix will appear in the next release of Sigil. As a workaround until then, please replace your "&" in opf:file-as with a ";" or any other non-xml special character. This will prevent the bug from striking until the new release comes out.
Thanks for your bug report!
KevinH
Quote:
Originally Posted by jugaor
Hi.
I've noticed that the ampersand sign is deleted when the Metadata editor is used. It happens with any field (as creator or contributor).
Ex.:
< dc:creator opf:role="aut" opf:file-as="Otero, Manuel & Flores, Dolores" >Manuel Otero & Dolores Flores< /dc:creator >
< dc:contributor opf:file-as="Montiel, Sara & Blanes, Camilo" opf:role="trl" >Sara Montiel & Camilo Blanes< /dc:contributor >
I prefer to use this form for both authors appear together in a single line (otherwise ADE and other display only the first one; Nook, the last one, IIRC).
It doesn't happen if the epub is opened and saved: only when the editor Metadata is used.
TIA.
|