Quote:
Originally Posted by ownedbycats
Question: For the fanfic description in the Calibre metadata, does FFF change leading dashes at all? e.g.
Code:
<p>"Blah blah blah, quote text here."</p>
<p>- Quote author</p>
In a few of my fics, I noticed the second bit got replaced with a <li>Quote author</li> (Calibre description only; the title page summary is fine) and I'm trying to identify what's doing it.
|
I would speculate Calibre is 'helping' with what it thinks is markdown(MD).
If you have
keep_summary_html:false, calibre.library.comments.sanitize_comments_html is called on the
description before it's given to Calibre. There's a comment about MD text, and FFF has been calling sanitize_comments_html since at least 2014 and probably longer. It gets hard to trace exactly.
Code:
if not self.getConfig('keep_summary_html'):
## because of the html->MD text->html dance, text only
## (or MD/MD-like) descs come out better.
description = sanitize_comments_html(description)
If you have
keep_summary_html:true (which is likely, given your snippet), FFF 'strains' the description HTML through BeautifulSoup(again), but otherwise leaves it alone before passing to Calibre.
There are some indications the html5lib knows about MD, but if that were the cause, it would show up in FFF's title page too.