https://bugs.winehq.org/show_bug.cgi?id=39930
Bug ID: 39930 Summary: HtmlHelp() shows blank page when '\' is used as path separator after '::' Product: Wine Version: 1.9.0 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: hhctrl.ocx Assignee: wine-bugs@winehq.org Reporter: foka@debian.org Distribution: ---
Despite the fact that Microsoft documentation clearly states that
Anything after the double colon (::) must use forward slashes (/), in accordance with URL standards.
(see https://support.microsoft.com/en-us/kb/235226), Windows developers tend to forget(?) that rule and use backslashes () after the double colon.
For example, running UFile 2013 under Wine, opening the tutorial comes up with a blank window, and the trace/fixme messages are logged:
trace:htmlhelp:HtmlHelpW (0x1006e, L"ubxkbE.chm::\tutorial/pages/1intro.htm>DT_HTML_TUT", command=HH_DISPLAY_TOPIC, data=0) trace:htmlhelp:NavigateToChm 0x208ba0 L"C:\Program Files\UFile 2013\ubxkbE.chm" L"\tutorial/pages/1intro.htm" trace:htmlhelp:AppendFullPathURL L"C:\Program Files\UFile 2013\ubxkbE.chm" 0x31dc98 L"\tutorial/pages/1intro.htm" trace:htmlhelp:navigate_url L"mk:@MSITStore:C:\Program Files\UFile 2013\ubxkbE.chm::/\tutorial/pages/1intro.htm" fixme:ieframe:handle_navigation_error Navigate to error page
But of course, as a retail product, UFile 2013's tutorial of course shows correctly in Windows.
Apparently, Microsoft knows how often developers get confused by '/' and '', and silently accepts such erroneous backslashes so that the relevant HTML Help can be displayed.
The current Wine implementation of HTML Help, however, does not account for such developer errors, leading to such blank HTML Help windows in (slightly) buggy programs like UFile 2013.
https://bugs.winehq.org/show_bug.cgi?id=39930
Anthony Fok foka@debian.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |foka@debian.org
--- Comment #1 from Anthony Fok foka@debian.org --- Created attachment 53328 --> https://bugs.winehq.org/attachment.cgi?id=53328 Screenshot of expected behaviour (HTML Help rendering)
https://bugs.winehq.org/show_bug.cgi?id=39930
--- Comment #2 from Anthony Fok foka@debian.org --- Created attachment 53329 --> https://bugs.winehq.org/attachment.cgi?id=53329 Screenshot of current "too-strict" behaviour (HTML Help not rendering)
https://bugs.winehq.org/show_bug.cgi?id=39930
--- Comment #3 from Anthony Fok foka@debian.org --- Created attachment 53334 --> https://bugs.winehq.org/attachment.cgi?id=53334 Proposed patch to allow backslash after '::' in HtmlHelp URL
The attached is my proposed patch to deal with this problem. I have tested it locally, and with it, I was able get QuickStart Tutorial, as well as other contextual help windows, to display properly in UFile 2013 under Wine.
I have chosen to change NavigateToChm(), but I suppose the "normalize backslashes after '::' to forward slashes" routine could have been added to HelpHtmlW(), AppendFullPathURL() or navigate_url() instead.
And I am sure you can tell from my patch that I am newbie in Windows and Wine programming, so please excuse my immature coding. :-) I am sure you will come up with code that is much more correct, appropriate and efficient.
Many thanks!
Anthony
https://bugs.winehq.org/show_bug.cgi?id=39930
Anthony Fok foka@debian.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch
https://bugs.winehq.org/show_bug.cgi?id=39930
winetest@luukku.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |winetest@luukku.com
--- Comment #4 from winetest@luukku.com --- You should simply submit it.
WCHAR indexNew[len+1];
and len was at creating time uninitialized so it gets value of...?
https://bugs.winehq.org/show_bug.cgi?id=39930
Alan alan1010035@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |alan1010035@gmail.com
--- Comment #5 from Alan alan1010035@gmail.com --- Created attachment 75139 --> https://bugs.winehq.org/attachment.cgi?id=75139 Sample CHM
Sample CHM to test with it
https://bugs.winehq.org/show_bug.cgi?id=39930
--- Comment #6 from Alan alan1010035@gmail.com --- i do not have access to UFile 2013 to retest the patch with it in wine 8 but Htmlhelp works just fine with sample CHM i attached