Description: Up to version 6.3, it was common for Writer (like OpenOffice Writer) to take HTML comments when importing HTML documents. Since version 6.4, HTML comments seem to get lost upon HTML import. Use Case: Generate documents by scripting, with extra metadata (such as section summaries) shown as comments. Steps to Reproduce: 1. Generate a simple valid HTML document with some HTML comments inserted within paragraphs. 2. Open the document with Writer. Actual Results: The document does not contain any comments. Expected Results: Each HTML comment is converted into a Writer comment and shows up at least in the navigator. Reproducible: Always User Profile Reset: No Additional Info: Behaviour has changed since LibreOffice version 6.4.0.3. Deinstalling version 6.4.0.3 and going back to version 6.3.4.2 fixes the problem.
Would you please attach one minimum html file "with extra metadata (such as section summaries) shown as comments"?
Created attachment 157741 [details] A html example file
Peter, following your steps, I can can see no difference between the html file opening with Writer or with Firefox or Chrome. I'm not familiar with html-files, but whre can I see html comments within your file? Do I need a special editor?
Open attachment 157741 [details] with 6.3.4.2 : see 3 comments 7.0.0.0.alpha : no comments shown Additional information. Possible to use 7.0.0.0.alpha to save comments in an .html file, but on "reload" the comments are not visible. (but they are visible in 6.3.4.2) (To see comments, open the .html file with a text editor (e.g., Notepad in Windows, vi or kate in linux). Look for entries that start "<!--" and end "-->" The text strings between the -- will appear in 6.3.x, but not in 7.0.0.0.alpha. )
I also see comments in Version: 6.3.4.2 (x64) Build-ID: 60da17e045e08f1793c57c00ba83cdfce946d0aa CPU-Threads: 4; BS: Windows 10.0; UI-Render: Standard; VCL: win; Gebietsschema: de-DE (de_DE); UI-Sprache: de-DE Calc: threaded but not in Version: 7.0.0.0.alpha0+ (x64) Build ID: eeb2d19e77d6dc47c68e8ba0920a02cf64a1247b CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: default; VCL: win; Locale: de-DE (de_DE); UI-Language: en-GB Calc: threaded
I want to clarify that I am referring to the component "swriter.exe" and not to the HTML editor component "sweb.exe" (which reads HTML files by default). The problem occurs when converting between HTML and ODT. Note: Web browsers usually don't show HTML comments.
Regression introduced by: https://cgit.freedesktop.org/libreoffice/core/commit/?id=9219242d42b7b0e5b00d7a1997cc7fcf35894627 author Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> 2019-09-06 10:50:49 +0200 committer Thorsten Behrens <Thorsten.Behrens@CIB.de> 2019-09-06 15:30:00 +0200 commit 9219242d42b7b0e5b00d7a1997cc7fcf35894627 (patch) tree a8f025f024db035801d30a237331747e83bc6f42 parent 77e39d55457385eb1585034e8e461ad9ba77e707 (diff) Disable inserting HTML comments as notes by default Bisected with: bibisect-linux64-6.4 Adding Cc: to Samuel Mehrbrodt @Samuel, so it seems some people use comments in html files. Would it be possible to hide them by default and make it possible to show them from the View menu ?
So there is already a config option for this. Search expert config for "IgnoreComments" and set to false. I don't see any reason why this should be on by default, as usually html comments are not meant to be seen by the user. In the special case mentioned by the bug reporter, he should just switch the config option.
Perhaps Samuel's advice should be added to the relevant help page: https://help.libreoffice.org/7.0/en-US/text/shared/01/about_meta_tags.html (I could make that change -- but would need advice about a correct formulation. I guess a sentence at the end of the "Import Tips" section?) or if this is a common action, then perhaps this control should be added as a checkbox in Tools - Options - Load/Save - HTML Compatibility?
I had a look at commit 9219242d42b7b0e5b00d7a1997cc7fcf35894627 causing the new behaviour. Obviously, there was no requirement for that modification. I suggest to revert the change and not to bloat LibreOffice's user interface.
(In reply to peter.88213 from comment #10) > I had a look at commit 9219242d42b7b0e5b00d7a1997cc7fcf35894627 causing the > new behaviour. > Obviously, there was no requirement for that modification. > I suggest to revert the change and not to bloat LibreOffice's user interface. The fix was done primarily for LibreOffice Online. When copying/pasting any text on Windows 10, Windows would automatically add comments like "<!--StartFragment-->" and "<!--EndFragment-->". Those were then imported by LO Online when pasting any text.
Samuel, thank you for clarifying the issue. Since the problem does not apply to the desktop version (I just tested it on Win 10 / LO6.3.4.2 / Firefox and Edge), I suggest to restrict the modification to the online version. Differences in behaviour between desktop and online variants are more likely to be accepted than changed behaviour upon update (may I remind of all the frustrating experiences with "windows as a service"?).