|
@@ -352,14 +352,17 @@ end;
|
|
|
|
|
|
function THTMLParser.DocDecodeNamedEntity(Name: string; var E: string): boolean;
|
|
function THTMLParser.DocDecodeNamedEntity(Name: string; var E: string): boolean;
|
|
var Found: boolean;
|
|
var Found: boolean;
|
|
- Code: integer;
|
|
|
|
- CC: integer;
|
|
|
|
|
|
+ Code: word;
|
|
|
|
+ CC: word;
|
|
begin
|
|
begin
|
|
Found:=true; Code:=-1;
|
|
Found:=true; Code:=-1;
|
|
Name:=LowCaseStr(Name);
|
|
Name:=LowCaseStr(Name);
|
|
if copy(Name,1,1)='#' then
|
|
if copy(Name,1,1)='#' then
|
|
begin
|
|
begin
|
|
- Val(copy(Name,2,255),Code,CC);
|
|
|
|
|
|
+ if Name[2]='x' then
|
|
|
|
+ Val('$'+copy(Name,3,255),Code,CC)
|
|
|
|
+ else
|
|
|
|
+ Val(copy(Name,2,255),Code,CC);
|
|
if CC<>0 then Code:=-1;
|
|
if CC<>0 then Code:=-1;
|
|
end;
|
|
end;
|
|
if (Name='lt') then E:='<' else { less-than sign }
|
|
if (Name='lt') then E:='<' else { less-than sign }
|
|
@@ -463,6 +466,9 @@ begin
|
|
(* if (Code=254) or (Name='thorn') then E:='?' else { small thorn, Icelandic }*)
|
|
(* if (Code=254) or (Name='thorn') then E:='?' else { small thorn, Icelandic }*)
|
|
if (Code=255) or (Name='yuml') then E:='y' else { small y, dieresis or umlaut }
|
|
if (Code=255) or (Name='yuml') then E:='y' else { small y, dieresis or umlaut }
|
|
if (Code=8217) then E:='''' else { acute accent as generated by TeXH }
|
|
if (Code=8217) then E:='''' else { acute accent as generated by TeXH }
|
|
|
|
+ if (Code=$FB00) then E:='ff' else { ff together }
|
|
|
|
+ if (Code=$FB01) then E:='fi' else { fi together }
|
|
|
|
+ if (Code=$FB02) then E:='fl' else { fl together }
|
|
Found:=false;
|
|
Found:=false;
|
|
DocDecodeNamedEntity:=Found;
|
|
DocDecodeNamedEntity:=Found;
|
|
end;
|
|
end;
|