Skip to content

Commit

Permalink
Delphi 7 and lower do not support UTF-8 source code, especially when …
Browse files Browse the repository at this point in the history
…there is a BOM at the beginning
  • Loading branch information
mhumm committed Apr 30, 2019
1 parent bcb1959 commit 90cba05
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions jvcl/run/JvHtmlParser.pas
Expand Up @@ -231,7 +231,7 @@ procedure TJvHTMLParser.AnalyseString(const Str: string);
var
Str2, Str3: string;
StartTag1, StartTag2: string;
I, J, K, Index: Integer;
I, J, J1, K, Index: Integer;
TagInfo: TTagInfo;
AttributesList: TStringList;

Expand Down Expand Up @@ -334,7 +334,17 @@ procedure TJvHTMLParser.AnalyseString(const Str: string);
while J <> 0 do
begin
// changed from StrSearch(case sensitive) to StrFind (case insensitive)
J := StrFind(StartTag1, Str, J);
if trim(StartTag2) = '' then
begin
J := StrFind(StartTag1, Str, J)
end
else
begin
J1 := J;
J := StrFind(StartTag1 + ' ', Str, J);
if J = 0 then
J := StrFind(StartTag1 + '>', Str, J1);
end;
if J > 0 then
begin
// changed from StrSearch(case sensitive) to StrFind (case insensitive)
Expand Down

0 comments on commit 90cba05

Please sign in to comment.