Bug 120491 - Exporting as epub inserts line that fails most content submission checks
Summary: Exporting as epub inserts line that fails most content submission checks
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
6.1.0.3 release
Hardware: All Windows (All)
: medium normal
Assignee: Miklos Vajna
URL:
Whiteboard: target:6.2.0 target:6.1.4
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-10 17:40 UTC by Michael Bauer
Modified: 2018-11-02 05:05 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Bauer 2018-10-10 17:40:14 UTC
Description:
Just used LO for the first time to create an epub for publication. It passed the IDPF validator and the validator in Sigil but upon submission at IngramSpark I received multiple instances of this error during their validation:

ERROR OEBPS/Text/untitled.html 6 59 Error while parsing file 'value of attribute "http-equiv" is invalid; must be a string matching the regular expression "([Dd][Ee][Ff][Aa][Uu][Ll][Tt]\-[Ss][Tt][Yy][Ll][Ee])|([Rr][Ee][Ff][Rr][Ee][Ss][Hh])|([Cc][Oo][Nn][Tt][Ee][Nn][Tt]\-[Tt][Yy][Pp][Ee])"'.

As it turns out, it seems that LO inserts an unnecessary line into the head:
<meta content="text/html; charset=UTF-8" http-equiv="content-type"/>

Apparently since this line is not needed, many validators just pass/ignore it but when you try and submit the file to someone like IngramSpark, they fail the epub.

I had to remove all instances of <meta content="text/html; charset=UTF-8" http-equiv="content-type"/> and then the file was passed.

Steps to Reproduce:
1. Open/Create a document with sections
2. Export epub
3. Check the code in <head>

Actual Results:
It inserts <meta content="text/html; charset=UTF-8" http-equiv="content-type"/>

Expected Results:
It probably shouldn't insert <meta content="text/html; charset=UTF-8" http-equiv="content-type"/>, at least not in this way?


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 Miklos Vajna 2018-10-11 07:37:28 UTC
Did you check how epubcheck reacts to just not writing the <meta> element?
Comment 2 Michael Bauer 2018-10-11 09:38:43 UTC
Using http://validator.idpf.org (which says it uses EpubCheck version 4.0.2) and haven taken out the <meta> line, I still get "No problems were found".
Comment 3 Miklos Vajna 2018-10-16 08:20:45 UTC
Okay, I'll take care of this.
Comment 4 Commit Notification 2018-10-24 10:44:50 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=548e60a8c47e270aba79a5f4e5911cbb35462814

tdf#120491 EPUB export: fix IngramSpark validator error

It will be available in 6.2.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 5 Commit Notification 2018-11-02 05:05:45 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-6-1":

https://git.libreoffice.org/core/+/a9b3f8ca95bffe3617da914be99d0ffddb2896ba%5E%21

tdf#120491 EPUB export: fix IngramSpark validator error

It will be available in 6.1.4.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.