LCLIntf openurl() / LazHelpHTML - HtmlBrowserHelpViewer can not pass query string or anchor target
Original Reporter info from Mantis: PaulANormanNZ
-
Reporter name: Paul Norman
Original Reporter info from Mantis: PaulANormanNZ
- Reporter name: Paul Norman
Description:
There have been a number of forum postings over the years identifying that under Windows at least, at some point a few years ago, it became impossible to pass anything more than a straight .html document path;
blah.html?someting=this&somethingElse=that or even just blah.html#goHere
All fail to fully work, blah.html will open ignoring the query string or anchor target.
THTMLBrowserHelpViewer.ShowNode passes the correct information to BrowserProcess (TProcessUTF8), BrowserProcess.CommandLine:=CommandLine;
But somewhere in BrowserProcess.Execute; query string and anchor target &LtPos;filename->?... and &LtPos;filename->#... all get lost.
This appears to happen under Windows where attempts to call BrowserProcess.execute are actually calling something like--
C:\WINDOWS\system32\rundll32.exe url.dll,FileProtocolHandler %s
Microsoft appear to have moved the goal posts on the use of url.dll, and this will not allow FPC anything after blah_blah.html file extension to be passed in %s.
LCLIntf openurl() and all kinds of direct system calls (apart from shellapi shellexecute() on Windows) all seem to also fail for parts of %s past the main file name.
Paul
Steps to reproduce:
Covered in description.
Additional information:
This sort of thing does works...
shellapi
shellexecute(0,
pchar('open'),
pchar(browserCommand) ,
pchar(buildUrl ),'',0);
Workaround using a registry key, and more notes in ...
http://forum.lazarus.freepascal.org/index.php/topic,24347.msg146443.html#msg146443
Mantis conversion info:
- Mantis ID: 26091
- OS: Windows
- OS Build: 8.1 Pro
- Build: Typhon 4.8
- Platform: Windows
- Version: 2.3 (SVN)