<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>Message</TITLE>

<META content="MSHTML 6.00.6000.16544" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=343030407-25052011><FONT face=Arial color=#0000ff size=2>You 
should not unescape recursively.</FONT></SPAN></DIV>
<DIV><SPAN class=343030407-25052011><FONT face=Arial color=#0000ff size=2>Input 
to EscapeHTML: '&lt;' Output: '&amp;lt;' : 
Correct</FONT></SPAN></DIV>
<DIV><SPAN class=343030407-25052011><FONT face=Arial color=#0000ff 
size=2>UnescapeHTML: input  '&amp;lt;' Output 
'<'   Wrong.</FONT></SPAN></DIV>
<DIV><SPAN class=343030407-25052011><FONT face=Arial color=#0000ff size=2>This 
is because you replace '&amp;' with '&' resulting in '&lt;' which is 
translated to '< ' in the next line. </FONT></SPAN></DIV>
<DIV><SPAN class=343030407-25052011><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=343030407-25052011><FONT face=Arial color=#0000ff 
size=2>Ludo</FONT></SPAN></DIV>
<DIV><SPAN class=343030407-25052011><FONT face=Arial color=#0000ff size=2><FONT 
face="Times New Roman" color=#000000 size=3> </FONT></FONT></SPAN></DIV>
<DIV><SPAN class=343030407-25052011><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN> </DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
  <DIV></DIV>
  <DIV class=OutlookMessageHeader lang=fr dir=ltr align=left><FONT face=Tahoma 
  size=2>-----Message d'origine-----<BR><B>De :</B> 
  fpc-pascal-bounces@lists.freepascal.org 
  [mailto:fpc-pascal-bounces@lists.freepascal.org] <B>De la part de</B> 
  ik<BR><B>Envoyé :</B> mercredi 25 mai 2011 08:34<BR><B>À :</B> 
  FPC-Pascal users discussions<BR><B>Objet :</B> Re: Re[2]: [fpc-pascal] 
  fpWeb and html and uri escaping/unescapingelements<BR><BR></FONT></DIV>
  <DIV dir=ltr><BR><BR><BR>
  <DIV class=gmail_quote>On Tue, May 24, 2011 at 12:21, José Mejuto <SPAN 
  dir=ltr><<A 
  href="mailto:joshyfun@gmail.com">joshyfun@gmail.com</A>></SPAN> wrote:<BR>
  <BLOCKQUOTE class=gmail_quote 
  style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hello 
    FPC-Pascal,<BR><BR>Tuesday, May 24, 2011, 10:09:03 AM, you 
    wrote:<BR><BR>i> I've created a patch with the Escape and unEscape 
    functions, and place it<BR>i> here: <A 
    href="http://bugs.freepascal.org/view.php?id=19407" 
    target=_blank>http://bugs.freepascal.org/view.php?id=19407</A><BR><BR>Un/escapeHTML 
    parsing must be in one go, specially the "&amp" one. Test 
    against:<BR><BR>"&amp;lt;"<BR></BLOCKQUOTE>
  <DIV><BR>I'm not sure what you mean here.<BR><BR>If you have already html 
  entities you should not escape them. If you do not have html entities you 
  should escape them.<BR>The Escaping and unescaping works well, I already 
  tested them before I sent them.<BR><BR> </DIV>
  <BLOCKQUOTE class=gmail_quote 
  style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid"><BR>Right 
    unescape "&lt;", your code "<".<BR><BR>--<BR>Best regards,<BR><FONT 
    color=#888888> José<BR></FONT></BLOCKQUOTE>
  <DIV><BR>Ido<BR> </DIV>
  <BLOCKQUOTE class=gmail_quote 
  style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid"><FONT 
    color=#888888></FONT>
    <DIV>
    <DIV></DIV>
    <DIV 
    class=h5><BR>_______________________________________________<BR>fpc-pascal 
    maillist  -  <A 
    href="mailto:fpc-pascal@lists.freepascal.org">fpc-pascal@lists.freepascal.org</A><BR><A 
    href="http://lists.freepascal.org/mailman/listinfo/fpc-pascal" 
    target=_blank>http://lists.freepascal.org/mailman/listinfo/fpc-pascal</A><BR></DIV></DIV></BLOCKQUOTE></DIV><BR></DIV></BLOCKQUOTE></BODY></HTML>