HTMLHelp do not work if BaseURL contain space
Original Reporter info from Mantis: pch
-
Reporter name: Patrick Chevalley
Original Reporter info from Mantis: pch
- Reporter name: Patrick Chevalley
Description:
If you set HTMLHelpDatabase.BaseURL with a path containing space the URL is interpreted as different parameter by the browser and it show nothing.
I try to quote the path or escape the space character from within my application but this not work due to the way the full URL is build in lazhelphtml.
The only way I found to work is to quote the URL within THTMLBrowserHelpViewer.ShowNode after the full parameter is build:
Index: lcl/lazhelphtml.pas
===================================================================
--- lcl/lazhelphtml.pas (revision 27112)
+++ lcl/lazhelphtml.pas (working copy)
@@ -355,12 +355,12 @@
// create params and replace %s for URL
URLMacroPos:=Pos('%s',Params);
if URLMacroPos>=1 then
- Params:=copy(Params,1,URLMacroPos-1)+Node.URL
+ Params:=copy(Params,1,URLMacroPos-1)+'"'+Node.URL+'"'
+copy(Params,URLMacroPos+2,length(Params)-URLMacroPos-1)
else begin
if Params<>'' then
Params:=Params+' ';
- Params:=Params+Node.URL;
+ Params:=Params+'"'+Node.URL+'"';
end;
CommandLine:=CommandLine+' '+Params;
Mantis conversion info:
- Mantis ID: 17228
- Version: 0.9.29 (SVN)
- Fixed in version: 0.9.29 (SVN)
- Monitored by: » Vladimir (Vladimir Zhirov)