First ePub requires XHTML, not HTML, and XHTML is stricter about what goes where.
For the first one, 'p' is not a valid child element of ul, only li is (for XHTML, that is). It looks like Calibre is inserting a p element to take care of whitespace, which it would've been better to ignore (but that's just a guess). I would think about submitting a bug to Koval (depending upon the original source)
For the second one text is not allowed outside of enclosing block element such as 'p' or 'div', from the closing 'p' tag in the original that you show, this is most likely a problem in your original content.
Running your original content through a XHTML validator may help.
|