Bug 1992695

Summary: Writer produces HTML <td> tags with duplicate style attributes
Product: Red Hat Enterprise Linux 8 Reporter: Andrew Mike <amike>
Component: libreofficeAssignee: Caolan McNamara <caolanm>
Status: CLOSED ERRATA QA Contact: Martin Krajnak <mkrajnak>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.4CC: alanm, brclark, casantos, jwright, mkielian, mkolbas, mkrajnak, sbarcomb
Target Milestone: betaKeywords: Triaged
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: libreoffice-6.4.7.2-6.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-05-10 13:31:48 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Andrew Mike 2021-08-11 15:23:59 UTC
Description of problem: 
When saving a table in LibreOffice Writer as HTML, the <td> tags are generated with two "style" attributes which is invalid HTML. This causes the table border rules included with the second style attribute to be ignored by a browser such as Firefox.

Version-Release number of selected component (if applicable):
6.4.7.2-5.el8 (also 5.3.6.1-25.el7_9)

How reproducible: 100%


Steps to Reproduce:
1. Launch LibreOffice Writer
2. Create a table with any number of rows and columns from "Table" -> "Insert Table"
3. Highlight the table and at the bottom set a background color for the table
4. With the table still highlighted, ensure all borders are turned on
5. Select "File" -> "Send" -> "Create HTML Document" and save the file

Actual results:
HTML file has two "style" attributes within the <td> tag.

Expected results:
HTML file has one "style" attributes within the <td> tag, with all specified formatting present.

Additional info:
- Reported upstream in Document Foundation Bugzilla 132739, linked below.
- This is also present in RHEL 7.9, as mentioned in the package release above.

Comment 3 Caolan McNamara 2021-08-12 11:59:46 UTC
my proposed fix: https://gerrit.libreoffice.org/c/core/+/120393

Comment 4 Martin Krajnak 2021-09-15 11:56:38 UTC
I was able to reproduce this bug on 8.4z, an I can confirm this is fixed by libreoffice-writer-6.4.7.2-6.el8.x86_64.

Comment 7 Martin Krajnak 2021-09-29 09:47:13 UTC
export_html_duplicit_style_attrs

Comment 9 errata-xmlrpc 2022-05-10 13:31:48 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: libreoffice security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:1766