[Jacket] Ampersands in title/authors/series not parsed

Bug #1393230 reported by Sylwia on 2014-11-16
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

Calibre 2.10, Windows 8
*conversion from EPUB/MOBI to EPUB/MOBI/PDF
* "insert metadata as page at start of book" checked

In the jacket inserted in converted file the title, author and series fields are parsed incorrectly.

1. The "&" (ampersand) in titles is not parsed at all.
ORIGINAL title: Trouble & the Wallflower
IN THE JACKET: Trouble the Wallflower

2. The "&" in authors is not parsed at all.
ORIGINAL author: Jane Austen & A.M. Arthur & Garrett Leigh
IN THE JACKET: Jane Austen A.M. Arthur Garrett Leigh

3. The "&" in series is parsed as "&"
ORIGINAL series: Cut & Run [7]
IN THE JACKET: Cut amp; Run [7]

I checked all the files in my library that could be affected going three years back and can say that
ad 1) & 2) alway was a problem
ad 3) this is a regression. Up until 2014.03, more less, the conversion used to be correct. (i.e Cut & Run [7])

I tried to modify the template.xhtml for jacket, but all my attempts ended with conversion crash.
I tried for example to replace {author} with {author:'re(re($, '(.*) & ', '\1 and '), ' & ', ', ')'}
Is it possible to modify the template beyond changing {series.roman} to {series} and removing some '<td>'?

I'm attaching "Pride & Prejudice" ebook, where I edited the author and series metadata before conversion to fully show the problem.

I will be grateful for any help. I love Calibre :-)

Sylwia (jutrznia) wrote :

Fixed in branch master. The fix will be in the next release. calibre is usually released every Friday.

 status fixreleased

Changed in calibre:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers