Bug 156573 - HID with "?" exists in the Help file but is not resolved correctly when F1 is pressed
Summary: HID with "?" exists in the Help file but is not resolved correctly when F1 is...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Documentation (show other bugs)
Version:
(earliest affected)
7.5.4.2 release
Hardware: All All
: medium normal
Assignee: Rafael Lima
URL:
Whiteboard: target:24.2.0
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-01 23:34 UTC by Rafael Lima
Modified: 2023-08-02 19:44 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rafael Lima 2023-08-01 23:34:06 UTC
When a help page for a HID that contains the "?" character is opened, it is not resolved correctly in "index.html" (the help's main page).

Steps to reproduce:
1) Open any LO app with the "gen" or "win" backend (if you have the very latest master, it will also work with "kf5")
2) Go to Tools - Macros - Organize Macros - Python
3) Hover over "Python"
4) Press F1 to open the help page

Result:
The help will try to open the page corresponding to the HID ".uno:ScriptOrganizer?ScriptOrganizer.Language:string=Python"

Note that the page should open, because this HID is properly set in:
/help/source/text/shared/01/06130200.xhp

However, inside the compiled help in the file "hid2file.js", the HID is set differently: ".uno:ScriptOrganizer%3FScriptOrganizer.Language:string=Python"

Note that "?" is replaced by "%3F" when "hid2file.js" is built.

There is a rule in "/help/help3xsl/generate_hid2file.xsl" that explicitly makes that change.

So what's missing is to replace "?" by "%3F" when the HID is called in the index.html main page.
Comment 1 Commit Notification 2023-08-02 09:00:21 UTC
Rafael Lima committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/help/commit/c13eb798f7eb33dbaa98fdd09ddb5374c5fbf0fc

tdf#156573 Correctly resolve HID with "?" character