* Patch from Vincent Snijders to fix EscapeText

git-svn-id: trunk@11610 -
This commit is contained in:
michael 2008-08-18 10:58:00 +00:00
parent cbdd282f19
commit acf0c8019b

View File

@ -136,9 +136,9 @@ end;
function THTMLWriter.EscapeText(AText: String): String;
begin
// replace by a more sensitive method.
Result:=StringReplace(AText,'&','&amp',[rfReplaceAll]);
Result:=StringReplace(Result,'<','&lt',[rfReplaceAll]);
Result:=StringReplace(Result,'>','&gt',[rfReplaceAll]);
Result:=StringReplace(AText,'&','&amp;',[rfReplaceAll]);
Result:=StringReplace(Result,'<','&lt;',[rfReplaceAll]);
Result:=StringReplace(Result,'>','&gt;',[rfReplaceAll]);
Result:=StringReplace(Result,#10,'<BR>',[rfreplaceAll]);
end;