Open a empty writer page. Save it as "HTML". Have a look at the HTML-code. It will look like this: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <meta http-equiv="content-type" content="text/html; charset=utf-8"/> <meta name="generator" content="LibreOffice 6.3.0.4 (Linux)"/> <br/> There is a DOCTYPE HTML 4.0 (which is obsolete since 1999!) and every standalone tag ends with "/>", which is only allowed with HTML5 or XHTML. Two possible solutions: 1) Set <!DOCTYPE html> instead of the very old DOCTYPE. It will set the document to HTML5. 2) Remove all frontslashes followed by ">". I would prefer to go forward, not back to 1999! All tested with LO 6.3.0.4 (see above), OpenSUSE 15 64bit rpm Linux.
confirmed with LO 6.0.7.3 (Ubuntu Mate 18.04)
Could also reproduce this in OpenSUSE 15 with LO 5.1.5.2, the oldest Version, I have installed here.
The definitions currently in use are the following: #define OOO_STRING_SVTOOLS_HTML_doctype40 "HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\"" #define OOO_STRING_SVTOOLS_XHTML_doctype11 \ "html PUBLIC \"-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN\" " \ "\"http://www.w3.org/Math/DTD/mathml2/xhtml-math11-f.dtd\"" Are these both obsolete now? I could just find this documentation and have no idea, if we can just drop them: https://www.w3.org/QA/2002/04/valid-dtd-list.html
(In reply to Andreas Heinisch from comment #3) > The definitions currently in use are the following: > > #define OOO_STRING_SVTOOLS_HTML_doctype40 "HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" has to be replaced by "html\" > #define OOO_STRING_SVTOOLS_XHTML_doctype11 > \ > "html PUBLIC \"-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN\" " > \ > "\"http://www.w3.org/Math/DTD/mathml2/xhtml-math11-f.dtd\"" > > Are these both obsolete now? Don't know. See https://lists.w3.org/Archives/Public/www-math/2003Jun/0041.html Seems it sometimes it better not using a doctype at all because the browser would try to fetch the whole DTD I have only seen the difference between HTML4 and HTML5. And the declaration of HTML4 and standalone tags like <br/> is a bug. The other doctypes are for xhtml-files and works well here.
Andreas Heinisch committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/821d2f8c058f7b7f45e23203d98aa9237289e265 tdf#126879 - Drop obsolete DOCTYPE HTML 4.0 It will be available in 7.3.0. 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.
Andreas Heinisch committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/a7084f156a75ab363d2562b485b240bd350563fc tdf#126879: sw_htmlexport: Add unittest It will be available in 7.3.0. 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.