Bug 166805 - Form controls: Help text will be cut off when "<" appears in text.
Summary: Form controls: Help text will be cut off when "<" appears in text.
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
24.8.5.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Rafael Lima
URL:
Whiteboard: target:25.8.0
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2025-05-31 10:33 UTC by Robert Großkopf
Modified: 2025-06-04 11:40 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
open document and move cursor over text controls. Tip help will be cut when '<' appears. (16.77 KB, application/vnd.oasis.opendocument.text)
2025-05-31 10:33 UTC, Robert Großkopf
Details
No repro on Windows (57.48 KB, image/png)
2025-05-31 10:39 UTC, Mike Kaganski
Details
Screenshot under OpenSUSE Linux with KDE (15.86 KB, image/png)
2025-05-31 11:00 UTC, Robert Großkopf
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Großkopf 2025-05-31 10:33:06 UTC
Created attachment 201049 [details]
open document and move cursor over text controls. Tip help will be cut when '<' appears.

Open the attached document.

Move cursor over the first field: Help text in properties of the field is "Das abDatum im Formular "Ware" muss <= dem Rechnungsdatum sein." You could only see the content up to "<". Removing "< =" and setting text content instead shows the whole content of Help text.

Expected behavior: All text content of help text should be shown in tip help.

Version: 25.2.3.2 (X86_64) / LibreOffice Community
Build ID: bbb074479178df812d175f709636b368952c2ce3
CPU threads: 6; OS: Linux 6.4; UI render: default; VCL: kf5 (cairo+xcb)
Locale: de-DE (de_DE.UTF-8); UI: en-US
Calc: threaded
Comment 1 Robert Großkopf 2025-05-31 10:39:04 UTC
This buggy behavior won't appear in LO 24.8.0.3, first appears here with LO 24.8.5.2. 
Help text will appear in older versions in one line. Has been changed from 24.8.0.3 to 24.8.5.2 to a text with linebreaks - and breaks away the content when '<' appears.
Comment 2 Mike Kaganski 2025-05-31 10:39:15 UTC
Created attachment 201050 [details]
No repro on Windows

Tested using Version: 25.2.4.1 (X86_64) / LibreOffice Community
Build ID: 09303ce8b49f86f106fccd32b1324662053027cc
CPU threads: 24; OS: Windows 11 X86_64 (10.0 build 26100); UI render: Skia/Vulkan; VCL: win
Locale: fr-FR (en_US); UI: en-GB
Calc: CL threaded

Specific to DE?
Comment 3 Robert Großkopf 2025-05-31 11:00:47 UTC
Created attachment 201051 [details]
Screenshot under OpenSUSE Linux with KDE

Note: Seems under Windows the help isn't shown with breaks. Help text in one line won't be cut off.
Comment 4 Julien Nabet 2025-05-31 12:38:37 UTC
On pc Debian x86-64 with master sources updated today, I could reproduce this but only with kf5 rendering, not with gtk3 or gen renderings.

Michael: thought you might be interested in this one since it seems specific to KDE.
Comment 5 Saburo 2025-06-01 06:41:47 UTC
bibisected with linux-64-25.2
Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: fa89130d4980662642cb81a05ec044dbe21fd5d0
CPU threads: 4; OS: Linux 6.5; UI render: default; VCL: kf5 (cairo+xcb)
Locale: ja-JP (ja_JP.UTF-8); UI: en-US
Calc: threaded

author	Rafael Lima
commit fa89130d4980662642cb81a05ec044dbe21fd5d0

tdf#162297 Wrap tooltips in Qt5
Acoording to the Qt documentation, in order to wrap the tooltip a rich-text style needs to be set.

This patch sets a dummy style to make sure the tooltip gets wrapped in LO.

Change-Id: I7e950932572030581abc1c81fb4c146cb4394eb4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171411

adding to CC: Rafael Lima
Comment 6 Mike Kaganski 2025-06-01 07:02:40 UTC
Unfortunately, the commit message doesn't mention a specific link to the respective documentation; but it looks like the change simply introduced some HTML tag there, which seems to switch Qt treatment. Then the tooltip needs to be escaped (`<` -> `&lt;` and `&` -> `&amp;` at least)
Comment 7 Rafael Lima 2025-06-01 21:53:28 UTC
(In reply to Mike Kaganski from comment #6)
> Unfortunately, the commit message doesn't mention a specific link to the
> respective documentation; but it looks like the change simply introduced
> some HTML tag there, which seems to switch Qt treatment. Then the tooltip
> needs to be escaped (`<` -> `&lt;` and `&` -> `&amp;` at least)

Indeed this is the case.

Proposed patch in Gerrit: https://gerrit.libreoffice.org/c/core/+/186117
Comment 8 Commit Notification 2025-06-04 11:40:58 UTC
Rafael Lima committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/2a00c4ce1edc6d09fc770f0af6ec4d823419afbb

tdf#166805 Escape characters in tooltips (qt5/qt6)

It will be available in 25.8.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.