Browse Source

* Escape < >

michael 6 years ago
parent
commit
cb834b582f
1 changed files with 3 additions and 1 deletions
  1. 3 1
      packages/rtl/browserconsole.pas

+ 3 - 1
packages/rtl/browserconsole.pas

@@ -86,10 +86,12 @@ Var
 begin
 begin
   CL:=LastLine.InnerHtml;
   CL:=LastLine.InnerHtml;
   CL:=CL+String(S);
   CL:=CL+String(S);
+  cl:=StringReplace(cl,'<','&lt;',[rfReplaceAll]);
+  cl:=StringReplace(cl,'>','&gt;',[rfReplaceAll]);
   cl:=StringReplace(cl,' ','&nbsp;',[rfReplaceAll]);
   cl:=StringReplace(cl,' ','&nbsp;',[rfReplaceAll]);
   cl:=StringReplace(cl,#13#10,'<br>',[rfReplaceAll]);
   cl:=StringReplace(cl,#13#10,'<br>',[rfReplaceAll]);
   cl:=StringReplace(cl,#10,'<br>',[rfReplaceAll]);
   cl:=StringReplace(cl,#10,'<br>',[rfReplaceAll]);
-  cl:=StringReplace(cl,#10,'<br>',[rfReplaceAll]);
+  cl:=StringReplace(cl,#13,'<br>',[rfReplaceAll]);
   LastLine.InnerHtml:=CL;
   LastLine.InnerHtml:=CL;
   if NewLine then
   if NewLine then
     begin
     begin