From 13baa543c5ab27b91a68248a262b7f45d655c90d Mon Sep 17 00:00:00 2001 From: wp Date: Thu, 31 Dec 2015 10:18:23 +0000 Subject: [PATCH] LHelp: Fix incorrect processing of internal links specified by absolute paths (issue #29267) git-svn-id: trunk@51096 - --- components/chmhelp/lhelp/chmdataprovider.pas | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/components/chmhelp/lhelp/chmdataprovider.pas b/components/chmhelp/lhelp/chmdataprovider.pas index 355143f3ee..04b9c84aa9 100644 --- a/components/chmhelp/lhelp/chmdataprovider.pas +++ b/components/chmhelp/lhelp/chmdataprovider.pas @@ -187,7 +187,9 @@ begin if Pos('ms-its:', NewURL) = 1 then begin if Pos('#', NewURL) = 0 then exit; - X := Pos('::', fNewURL); + X := Pos('::', NewURL); + if NewURL[X+2] = '/' then // NewURL is complete and absolute --> nothing to do + exit; fNewURL := Copy(fNewURL, X+3, MaxInt); end; @@ -230,6 +232,7 @@ var begin Result := TStringList.Create; Result.Delimiter := '/'; + Result.StrictDelimiter := true; Result.DelimitedText := ADir; LastName := ExtractFileName(ADir);