summaryrefslogtreecommitdiff
path: root/ide/whtmlhlp.pas
diff options
context:
space:
mode:
authormarco <marco@3ad0048d-3df7-0310-abae-a5850022a9f2>2009-09-06 17:06:36 +0000
committermarco <marco@3ad0048d-3df7-0310-abae-a5850022a9f2>2009-09-06 17:06:36 +0000
commitb18a806531da91ccaf2dde65f598620a7385ee20 (patch)
tree0550cc9d262592cc91692b53b96f5381753846a9 /ide/whtmlhlp.pas
parent80c8d5434c3f1d083debeb14c7a91f1183232f62 (diff)
downloadfpc-b18a806531da91ccaf2dde65f598620a7385ee20.tar.gz
* Fix several minor html canonicalization problems. FB's chm still gpf's in the index load.
git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@13660 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'ide/whtmlhlp.pas')
-rw-r--r--ide/whtmlhlp.pas9
1 files changed, 7 insertions, 2 deletions
diff --git a/ide/whtmlhlp.pas b/ide/whtmlhlp.pas
index 7e0a4ccbc4..2cc3d38df8 100644
--- a/ide/whtmlhlp.pas
+++ b/ide/whtmlhlp.pas
@@ -1346,6 +1346,11 @@ end;
Function TCHMTopicRenderer.CanonicalizeURL(const Base,Relative:String):string;
begin
+ if copy(relative,1,6)='http:/' then // external links don't need to be fixed since we can't load them.
+ begin
+ CanonicalizeUrl:=relative;
+ exit;
+ end;
if copy(relative,1,7)<>'ms-its:' then
CanonicalizeUrl:=combinepaths(relative,base)
else
@@ -1358,8 +1363,8 @@ begin
{$IFDEF WDEBUG}
DebugMessageS({$i %file%},' chmresolve "'+HRef+'"',{$i %line%},'1',0,0);
{$ENDIF WDEBUG}
-
- resolved:=false;
+ resolved:=false; AFileID:=0; ALinkID:=0;
+ href:=stringreplace(href,'%20',' ');
if copy(href,1,7)='ms-its:' then
resolved:=CHMResolve(Href,AFileId,ALinkID);
if not resolved then