Bug 167910 - XHTML-export : Wrong character export
Summary: XHTML-export : Wrong character export
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
25.2.4.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:26.2.0 target:25.8.1
Keywords:
Depends on:
Blocks: (X)HTML-Export
  Show dependency treegraph
 
Reported: 2025-08-11 17:49 UTC by Olivier Hallot
Modified: 2025-08-13 07:25 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
SAmple file in ODT (25.14 KB, application/vnd.oasis.opendocument.text)
2025-08-11 17:49 UTC, Olivier Hallot
Details
Sample file in FODT (235.05 KB, application/vnd.oasis.opendocument.text-flat-xml)
2025-08-11 17:52 UTC, Olivier Hallot
Details
Resulting XHTML with issue (10.61 KB, text/html)
2025-08-11 17:53 UTC, Olivier Hallot
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Hallot 2025-08-11 17:49:42 UTC
Created attachment 202282 [details]
SAmple file in ODT

In the sample files (odt and fodt), the line 

"Semantics: For a list N containing n numbers x1 to xn, with average x, AVEDEV(N) is equal to:"

and character "x-bar" is not correctly exported to XHTML.

Should be "average x-bar", where x-bar is x with an overline (or overbar).
Comment 1 Olivier Hallot 2025-08-11 17:52:03 UTC
Created attachment 202283 [details]
Sample file in FODT
Comment 2 Olivier Hallot 2025-08-11 17:53:44 UTC
Created attachment 202284 [details]
Resulting XHTML with issue
Comment 3 Julien Nabet 2025-08-11 18:25:25 UTC
I gave it a try but, after having checked in content.xml, the bar is added with some style so perhaps we may expect that the "x" has no bar above.
Comment 4 Regina Henschel 2025-08-11 19:18:33 UTC
A template for "overline" is missing in share\xslt\export\common\styles\style_mapping_css.xsl

@Julian, you can try out your ideas in the normal build, before making changes to the core. 

It will become more complicate, if you want to export the case of having underline and overline at the same time, or if you want to export the line color too, or if you want to export the line style too. Those things are in principle available in CSS.

@Olivier: AFAIK, the xsl-files for the ODF to XHTML conversion for the ODF TC are in https://github.com/oasis-tcs/odf-tc/blob/master/src/test/resources/odf1.4/tools/odf2html/export. Svante knows about it and can tell what to do, when he is back from vacation. But fixing it for LibreOffice has to be done anyway. Thus having it in Bugzilla is OK.
Comment 5 Commit Notification 2025-08-12 14:31:07 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/825edbcc6774ca7d65a903eeb59385e103daec56

tdf#167910 filter: xhtml: simplistic conversion of overline to CSS

It will be available in 26.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 Commit Notification 2025-08-12 14:31:10 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/034276dbfcb15762211aee2e40b7a644375f3d36

tdf#167910 filter: xhtml: try to handle combinations of underline and overline

It will be available in 26.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 7 Commit Notification 2025-08-13 07:25:43 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-25-8":

https://git.libreoffice.org/core/commit/809c6ea37f3a6b06569bdf3f9049bf2dd8238cc6

tdf#167910 filter: xhtml: simplistic conversion of overline to CSS

It will be available in 25.8.1.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Commit Notification 2025-08-13 07:25:45 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-25-8":

https://git.libreoffice.org/core/commit/8c6129cfe0669171d502d6662b2b4e31d8ac5ca0

tdf#167910 filter: xhtml: try to handle combinations of underline and overline

It will be available in 25.8.1.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.