ebooklib icon indicating copy to clipboard operation
ebooklib copied to clipboard

Round-tripping an epub strips stylesheet links

Open inklesspen opened this issue 7 years ago • 3 comments

If I load an epub whose chapter files have a stylesheet <link> tag, it gets stripped because the stylesheet is only referenced in self.content, not self.links.

inklesspen avatar Sep 24 '17 06:09 inklesspen

This is clearly a bug. It also does not read language or title defined in the original HTML.

aerkalov avatar Oct 08 '17 15:10 aerkalov

Also, any <meta> tags are stripped from the head.

paul-2021 avatar Oct 29 '20 11:10 paul-2021

The part with tags is intentional. Library ignores a lot of things and it is up to the user to copy some of the data. It assumes certain directory structure where the static or html files will go. So you need to rewrite url for static files in your document and etc. Same goes for metadata. It is up to the user to copy metadata it wants. This is mainly because it is easier to take what you want rather then copy everything and then fail epubcheck validation because you copied everything.

aerkalov avatar Nov 10 '20 22:11 aerkalov