FB2 conversion creates invalid html

Bug #1752141 reported by Silvara
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calibre
Invalid
Undecided
Unassigned

Bug Description

Converting FB2 to EPUB creates invalid html for the `poem` element: it creates a `blockquote` which contains text. Blockquotes cannot contain text.

Revision history for this message
Silvara (mistresssilvara) wrote :
Revision history for this message
Kovid Goyal (kovid) wrote : Re: calibre bug 1752141

text is perfectly valid inside blockquote in the HTML 5 spec, and I know
of no actual HTML renderers that have trouble with text inside
blockquote.

https://dev.w3.org/html5/spec-preview/the-blockquote-element.html

(content model is flow content and text is flow content)

So what actual problem are you having? Complaints from the useless
epubcheck?

 status invalid

Changed in calibre:
status: New → Invalid
Changed in calibre:
status: Invalid → New
Revision history for this message
Silvara (mistresssilvara) wrote :

EPUB2 books do not use html5. They use XHTML. In XHTML, blockquotes contain block elements only.

The problem is invalid XML documents Calibre generates in that case, as they do not conform to the scheme.

Revision history for this message
Kovid Goyal (kovid) wrote :

Yes, and conforming to the schema is utterly pointless since not conforming to it has no actual real world consequences and will have no real world consequences, ever. https://manual.calibre-ebook.com/faq.html#the-epub-i-produced-with-calibre-is-not-valid

Once again, do you know of a single EPUB 2 renderer that actually fails to render text inside blockquotes, if so feel free to re-open, otherwise stop wasting my time.

Changed in calibre:
status: New → Invalid
Revision history for this message
Eli Schwartz (eschwartz) wrote :

Also as the FAQ pointed out, if you actually want valid XHTML you need to start with valid XHTML, which I am pretty sure FB2 does not qualify as...

Revision history for this message
Kovid Goyal (kovid) wrote :

That said, in this case there is no harm in adding <div> wrappers, if
for no reason other than to silence the useless epubcheck, so https://github.com/kovidgoyal/calibre/commit/c9f56651ba8f4b405b716dd1a3bfa3809546e3b1

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.