Bug 85231

Summary: Drop HTML 4.0 export
Product: LibreOffice Reporter: Rezonansowy <lukas.cello>
Component: WriterAssignee: Not Assigned <libreoffice-bugs>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: medium CC: lukas.cello, qubit
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Rezonansowy 2014-10-20 10:59:38 UTC
I've experienced this when I've exported LO's LICENSE document to HTML (from read-only mode). The encoding was:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

It's very old technology and export to something like this isn't a right way. I think we should switch to HTML5 and add ability to select XHTML optionally.

The current problem is that there's no clear way to save/export document to HTML.
We have:
* save dialog - olde HTML4 Transitional as one and only option to save docs in HTML
* export dialog - XHTML 1.1 plus MathML 2.0 in exporting

What is the difference between them? LO can edit HTML5 docs with no problems.

My proposal:
* make HTML5 save format instead of HTML4 Transitional
* stop offer to save in HTML4 Transitional
* remove HTML entry from export dialog, HTML could be edited in LO Writer, unlike PDF
* make two entries (split current option) in save dialog: HTML5 (.html) and XHTML (.html)
Comment 1 Robinson Tryon (qubit) 2014-10-26 20:19:15 UTC
(In reply to Rezonansowy from comment #0)
> I've experienced this when I've exported LO's LICENSE document to HTML (from
> read-only mode). The encoding was:
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> 
> It's very old technology and export to something like this isn't a right
> way. I think we should switch to HTML5 and add ability to select XHTML
> optionally.

(Marking as Enhancement)

> 
> The current problem is that there's no clear way to save/export document to
> HTML.
> We have:
> * save dialog - olde HTML4 Transitional as one and only option to save docs
> in HTML
> * export dialog - XHTML 1.1 plus MathML 2.0 in exporting
> 
> What is the difference between them?

Well they're different export mechanisms. I think the HTML4 ("html") export is a bit older addition to the codebase.

> LO can edit HTML5 docs with no problems.
> 
> My proposal:
> * make HTML5 save format instead of HTML4 Transitional
> * stop offer to save in HTML4 Transitional
> * remove HTML entry from export dialog, HTML could be edited in LO Writer,
> unlike PDF
> * make two entries (split current option) in save dialog: HTML5 (.html) and
> XHTML (.html)

This seems mostly reasonable. IIRC, stuff in the Save(-As) dialog are mostly editable formats, and stuff in the Export dialog are more read-only formats; I'm not sure the precise thinking about HTML in the Save dialog :-)

The one question I have is: Would we lose support with older browsers if we moved export to a newer version of HTML?

Status -> NEW
Comment 2 Rezonansowy 2014-10-26 22:33:57 UTC
(In reply to Robinson Tryon (qubit) from comment #1)
> The one question I have is: Would we lose support with older browsers if we
> moved export to a newer version of HTML?

Rather no, most HTML common tags are same, and the specific others, like <section> or <article> are purely semantic and safely ignored in older browser. See https://en.wikipedia.org/wiki/HTML5#Error_handling

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.