ciromattia / kcc

KCC (a.k.a. Kindle Comic Converter) is a comic and manga converter for ebook readers.
ISC License
2.54k stars 205 forks source link

Metadata editor incorrectly expands ampersands (&) #344

Open jamesdanylik opened 4 years ago

jamesdanylik commented 4 years ago

It appears ampersands are inappropriately expanded when used in the Series field of the metadata editor.

I discovered this when trying to set the name field of a Yotsuba&! manga. It allows this input without issue -- but I discovered the output books (and indeed the edited, input book files) have the name Yotsuba&!. It appears the metadata format is XML based; maybe this is related?

Anyway, this behavior seems to apply anytime an ampersand (&) is used at all, not just in proximity to an exclamation mark (!).

jamesdanylik commented 4 years ago

After more testing, this seems unrelated to XML. When saveXML is called with new data present in self.rawdata, the incorrect expansion is already there. If I manually crush it by deleting the string amp;, everything works as expected.

Maybe this is from QT someplace?

axu2 commented 1 year ago

Tried with the qt6 build above still expanding the amp

sillysleepylammie commented 7 months ago

image bug is still not fixed in 5.6.5

just-smol commented 4 months ago

Following this up to add that apostrophes also expand for me in case that is useful information. This could be directly caused by the initial expansion though. Also it's not just in the title but in the epub itself. The content.opf, nav.html, and toc.ncx all have this error. So far it is only apostrophes and ampersands I have seen come out wrong, forward slash and other punctuation seems to be unaffected. image