Bug 66302 - FILESAVE: Formulae exported to XHTML incorrectly
Summary: FILESAVE: Formulae exported to XHTML incorrectly
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.0.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: BSA
Keywords:
Depends on:
Blocks: (X)HTML-Export
  Show dependency treegraph
 
Reported: 2013-06-28 07:31 UTC by callow.mark
Modified: 2023-05-13 21:55 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Simple .odt doc with table of formulae (143.95 KB, application/vnd.oasis.opendocument.text)
2013-06-28 07:33 UTC, callow.mark
Details

Note You need to log in before you can comment on or make changes to this bug.
Description callow.mark 2013-06-28 07:31:22 UTC
Problem description: 

Steps to reproduce:
1. Open the document I will attach in a moment. Observe the table with mathemetical formulae.
2. Export the document as XHTML
3. Open the exported .html file in various web browsers and observe.

Current behavior: The output only looks correct in Firefox

Expected behavior:  The output should look correct in any web browser.

The output is correct in Firefox, which supports MathML.

In other browsers that support MathML, such as Safari and Opera, the formulae are displayed correctly via the MathML. However the fallback dataURL image is also shown, as an empty box in most cases, or as a box with the broken image icon.

In browsers which do not support MathML, e.g. Chrome and IE, a pretty bad (incomplete in many cases) text version of the formula is shown together with the same bad dataURL images as noted above.

So there are 3 issues:
- the fallback dataURL images are broken
- the fallback images are shown in some browsers when they shouldn't be.
- the plain text version is shown in non-MathML supporting browsers as well as the broken fallback images. I'm not sure why plain text is ever exported.




              
Operating System: All
Version: 4.0.0.3 release
Comment 1 callow.mark 2013-06-28 07:33:34 UTC
Created attachment 81619 [details]
Simple .odt doc with table of formulae
Comment 2 Adam Johnson 2013-06-29 03:02:40 UTC
I can confirm this bug.  The output is correct in Firefox 22 but incorrect in Opera 12.15, Internet Explorer 10, and Google Chrome 27.

(Operating System: Windows 7, LibO Version:4.1.0.1 Build ID: 1b3956717a60d6ac35b133d7b0a0f5eb55e9155)
Comment 3 Jan Koberstein 2013-07-03 11:28:54 UTC
I can confirm, that the export is not displayed correctly on some browsers.

I exported the document with LibO OS: WinXP (SP3), LibO version: 4.0.3.3 (Build ID: 0eaa50a932c8f2199a615e1eb30f7ac74279539)

I opened the export with
- OS: WinXP Professional (SP3) 32bit, Internet Explorer 7 (Version: 7.0.5730.13) displayed incorrect (something like "image not found"-icon),
- OS: WinXP Professional (SP3) 32bit, Google Chrome 27.0.1453.116 displayed incorrect (something like "image not found"-icon),
- OS: WinXP Professional (SP3) 32bit, Firefox 20.0.1 displayed correct

After that I inspected the created HTML-file:
<img>-tags with embedded image-data are used, maybe these embedded images could not be handled correctly by the browsers.

Nice Regards,
Jan
Comment 4 callow.mark 2013-07-04 02:32:56 UTC
(In reply to comment #3)
> 
> I opened the export with
> - OS: WinXP Professional (SP3) 32bit, Internet Explorer 7 (Version:
> 7.0.5730.13) displayed incorrect (something like "image not found"-icon),
> - OS: WinXP Professional (SP3) 32bit, Google Chrome 27.0.1453.116 displayed
> incorrect (something like "image not found"-icon),
> - OS: WinXP Professional (SP3) 32bit, Firefox 20.0.1 displayed correct
> 
I want to point out, again, that in addition to failing to display the dataURL images, Chrome and IE display an often incorrect plain text version of the formulae.

Maybe I misunderstand the purpose of the dataURL images. I assumed they contained images of the formulae for non-MathML browsers. If that is so there should be no need to export a plain text version as yet another fallback.
Comment 5 QA Administrators 2015-04-01 14:42:04 UTC Comment hidden (obsolete)
Comment 6 Buovjaga 2015-04-24 11:29:30 UTC
Yep, incorrect in Chrome 42 and IE 11.

Win 7 Pro 64-bit Version: 5.0.0.0.alpha1+ (x64)
Build ID: f3375fa07f27bd2ade519af3c07d69040d10eaa9
TinderBox: Win-x86_64@42, Branch:master, Time: 2015-04-22_23:38:50
Locale: fi_FI
Comment 7 QA Administrators 2016-09-20 09:32:43 UTC Comment hidden (obsolete, spam)
Comment 8 QA Administrators 2019-12-03 14:10:47 UTC Comment hidden (obsolete)
Comment 9 Stéphane Guillou (stragu) 2021-05-18 11:57:22 UTC
Testing with LO 7.2 Alpha0, I opened the XHTML export with both Firefox 88.0.1 and Chromium 90.0.4430.93

Firefox: everything looks good

Chromium: the only remaining issue is the division bar which should have elements above and below. It does not show, and all elements of the formula are displayed on the same line.

Version: 7.2.0.0.alpha0+ / LibreOffice Community
Build ID: 6b09276d157abada74e1a4989700139167207778
CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2021-05-14_04:32:30
Calc: threaded
Comment 10 Stéphane Guillou (stragu) 2023-05-13 21:55:39 UTC
Output now looks good in Firefox 112.0.2, Chromium 113.0.5672.63 and Opera 98.0.4759.15, with XHTML exported with:

Version: 7.6.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: b5a22fceed57f05eb43a5fb0817afbc141610c5e
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Marking as "resolved - works for me" but please set back to "new" if you can still see remaining issues. Maybe there still are problems that are hidden by the improved MathML support in the tested browsers?