Bug 142466 - Export as XHTML should use the .xhtml extension instead of .html, os/DE dependent
Summary: Export as XHTML should use the .xhtml extension instead of .html, os/DE depen...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
6.2.5.2 release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: File-Dialog (X)HTML-Export
  Show dependency treegraph
 
Reported: 2021-05-24 14:12 UTC by Stéphane Guillou (stragu)
Modified: 2023-07-09 16:33 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
html file generated (35.25 KB, image/jpeg)
2021-05-26 13:07 UTC, paulo g.
Details
file extension, output of file command (29.55 KB, image/png)
2021-06-08 10:29 UTC, Stéphane Guillou (stragu)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stéphane Guillou (stragu) 2021-05-24 14:12:32 UTC
Description:
Currently, using File > Export.. > XHTML will result in a file with the extension .html

It would be great to use .xhtml instead to be more specific, and to not conflict with another version of the same document saved as HTML with File > Save as... > HTML.

Another benefit is that the user's system will be able to suggest applications more suited to editing and opening this particular kind of file.

Steps to Reproduce:
1. Create a document, in Calc or Writer
2. File > Export... > XHTML
3. See file extension

Actual Results:
Saves as ".html"

Expected Results:
Should save as ".xhtml"


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.2.0.0.alpha1+ / LibreOffice Community
Build ID: 4a9eef7849a75ba91806886ea9c96d114c8d56f9
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-22_06:45:25
Calc: threaded
Comment 1 V Stuart Foote 2021-05-24 16:35:27 UTC
Can not confirm on recent Windows builds. 

.xhtml extension is already assigned by default for the export filter.

Every ODF that I use File -> Export and then select the "XHTML (*.html,*.xhtml) filter receives the .xhtml extension matching its file format & the "W3C//DTD XHTML 1.1 plus MathML 2.0//EN"

Maybe check a more current release or a nightly dev against LO 7.2.0

=-testing-=

Version: 7.1.3.2 (x64) / LibreOffice Community
Build ID: 47f78053abe362b9384784d31a6e56f8511eb1c1
CPU threads: 8; OS: Windows 10.0 Build 19042; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL
Comment 2 Stéphane Guillou (stragu) 2021-05-25 06:33:42 UTC
Hi Stuart

Interesting! As you can see in my first comment, I used a very recent build from a couple of days ago:

Version: 7.2.0.0.alpha1+ / LibreOffice Community
Build ID: 4a9eef7849a75ba91806886ea9c96d114c8d56f9
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-22_06:45:25
Calc: threaded

I only put 7.0.4 as the earliest version affected as I haven't tested an earlier one.

I also tried a version closer to yours, with the same result:

Version: 7.1.3.2 / LibreOffice Community
Build ID: 47f78053abe362b9384784d31a6e56f8511eb1c1
CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Setting to unconfirmed.
Comment 3 paulo g. 2021-05-26 13:07:58 UTC
Created attachment 172367 [details]
html file generated
Comment 4 V Stuart Foote 2021-05-26 13:47:48 UTC
(In reply to paulo g. from comment #3)
> Created attachment 172367 [details]
> html file generated

That clip shows it with an XHTML document type and DTD. The same as I get on filter export to *.xhtml on Windows. 

So what is the saved "extension" for the file, is it .xhtml or .html?

What MIME type is returned with a 'file' command against the export?
Comment 5 Stéphane Guillou (stragu) 2021-06-08 10:29:38 UTC
Created attachment 172700 [details]
file extension, output of file command

(In reply to V Stuart Foote from comment #4)

> That clip shows it with an XHTML document type and DTD. The same as I get on
> filter export to *.xhtml on Windows. 
> 
> So what is the saved "extension" for the file, is it .xhtml or .html?
> 
> What MIME type is returned with a 'file' command against the export?

The file extension used is .html, but the MIME returned by the file command returns the following:

Untitled 1.html: XML 1.0 document, ASCII text, with very long lines

My issue is that I think the file should be named "xxxx.xhtml" instead of "xxxx.html", to be more specific and more clearly differentiate it from another HTML export.

Tested with:

Version: 7.2.0.0.alpha1+ / LibreOffice Community
Build ID: 399a6472f666ae6c3e20b6f8367f9fd089c15605
CPU threads: 4; OS: Linux 5.4; 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-06-05_17:38:40
Calc: threaded
Comment 6 V Stuart Foote 2021-06-08 13:39:13 UTC
Windows builds assign the correct .xhtml file extension to the export. 

But setting the expert configuration UseSystemFileDialog 'false' the LibreOffice file dialog does assign the .html to the XHTML export.

The LibreOFfice file dialog is affected, but which other os/DE file managers are also?
Comment 7 Stéphane Guillou (stragu) 2021-07-08 06:36:19 UTC
Reproduced on 6.2.5:

Version: 6.2.5.2
Build ID: 1ec314fa52f458adc18c4f025c545a4e8b22c159
CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3; 
Locale: en-AU (en_AU.UTF-8); UI-Language: en-US
Calc: threaded
Comment 8 QA Administrators 2023-07-09 03:16:17 UTC Comment hidden (obsolete)
Comment 9 Stéphane Guillou (stragu) 2023-07-09 16:33:33 UTC
Still the case using the DE file dialog from GNOME 3.36.8 and:

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

Also the case on macOS 13.2.1 with LO 7.5.4.2 using the OS dialog.

In both case, the dropdown 

So Windows seems to be the exception here.