<!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=656222007-25052011><FONT face=Arial color=#0000ff size=2>This 
is a very minimalistic implementation covering only partial ascii character 
escaping. To cover ASCII only in unescapeHTML you should also add  
'&nbsp' which corresponds with the space character ' '. Also the 
format <FONT face="Times New Roman" color=#000000 
size=3>&#<I>entity_number;</I></FONT> is missing 
('&lt;' or '&#60;' equals '<')</FONT></SPAN></DIV>
<DIV><SPAN class=656222007-25052011><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=656222007-25052011><FONT face=Arial color=#0000ff size=2>To 
support iso-8859-1 which is default in most browsers you'll need a lot 
more. See f.e. <A 
href="http://www.w3schools.com/tags/ref_entities.asp">http://www.w3schools.com/tags/ref_entities.asp</A></FONT></SPAN></DIV>
<DIV><SPAN class=656222007-25052011><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN> </DIV>
<DIV><FONT face=Arial><FONT size=2><FONT color=#0000ff><SPAN 
class=656222007-25052011>Ludo</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><FONT color=#0000ff><SPAN 
class=656222007-25052011></SPAN><SPAN 
class=656222007-25052011></SPAN></FONT></FONT></FONT> </DIV>
<DIV></DIV>
<DIV><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> mardi 24 mai 2011 10:09<BR><B>À :</B> FPC-Pascal 
users discussions<BR><B>Objet :</B> Re: [fpc-pascal] fpWeb and html and uri 
escaping/unescaping elements<BR><BR></DIV></FONT>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
  <DIV dir=ltr>
  <DIV class=gmail_quote>On Tue, May 24, 2011 at 00:28, ik <SPAN dir=ltr><<A 
  href="mailto:idokan@gmail.com">idokan@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">
    <DIV dir=ltr><BR><BR><BR>
    <DIV class=gmail_quote>
    <DIV class=im>On Tue, May 24, 2011 at 00:23, Michael Van Canneyt <SPAN 
    dir=ltr><<A href="mailto:michael@freepascal.org" 
    target=_blank>michael@freepascal.org</A>></SPAN> wrote:<BR>
    <BLOCKQUOTE class=gmail_quote 
    style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
      <DIV><BR><BR>On Tue, 24 May 2011, ik wrote:<BR><BR>
      <BLOCKQUOTE class=gmail_quote 
      style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hello,<BR><BR>Does 
        fpWeb have any method/function that escape and un-escape html and URI 
        elements ?<BR></BLOCKQUOTE><BR></DIV>Yes.<BR><BR>in 
      fphttpclient:<BR><BR>Function EncodeURLElement(S : String) : 
      String;<BR>Function DecodeURLElement(Const S : String) : String;<BR><BR>We 
      should maybe move them to URIParser or maybe even 
    strutils.<BR></BLOCKQUOTE></DIV>
    <DIV><BR>I can not find any HTML encode and decode, I'll make one and open a 
    bug with the patches.<BR>Where do you think it will be best to place it (I 
    mean the unit) ?<BR></DIV></DIV></DIV></BLOCKQUOTE>
  <DIV><BR>I've created a patch with the Escape and unEscape functions, and 
  place it here: <A 
  href="http://bugs.freepascal.org/view.php?id=19407">http://bugs.freepascal.org/view.php?id=19407</A><BR> </DIV>
  <BLOCKQUOTE class=gmail_quote 
  style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
    <DIV dir=ltr>
    <DIV class=gmail_quote>
    <DIV> </DIV>
    <BLOCKQUOTE class=gmail_quote 
    style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid"><BR>Michael.<BR></BLOCKQUOTE>
    <DIV><BR>Thanks,<BR><BR>Ido<BR> </DIV>
    <DIV class=im>
    <BLOCKQUOTE class=gmail_quote 
    style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">_______________________________________________<BR>fpc-pascal 
      maillist  -  <A href="mailto:fpc-pascal@lists.freepascal.org" 
      target=_blank>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></BLOCKQUOTE></DIV></DIV><BR></DIV></BLOCKQUOTE></DIV><BR></DIV></BLOCKQUOTE></BODY></HTML>