[DUG] formatting a string for HTML

David Moorhouse (DUG) delphi at moorhouse.net.nz
Wed Jul 28 19:36:33 NZST 2010


In the Internet/HTTPApp.pas unit

function HTTPDecode(const AStr: AnsiString): AnsiString;
function HTTPEncode(const AStr: AnsiString): AnsiString;
function HTMLEncode(const AStr: String): String;
function HTMLDecode(const AStr: String): String;


HTH

David


Original Message -----------------------
Not quite as comprehensive as I was after, but I guess I'll start with 
that - cheers.

Alister Christie
Computers for People
Ph: 04 471 1849 Fax: 04 471 1266
http://www.salespartner.co.nz
PO Box 13085
Johnsonville
Wellington


On 28/07/2010 11:55 a.m., Conor Boyd wrote:
> I use the StrHtmlEncode method in the Indy IdStrings.pas unit.
>
> It's pretty basic, as you will see. ;-)
>
> HTH,
>
> Conor
>
> -----Original Message-----
> From: delphi-bounces at delphi.org.nz [mailto:delphi-bounces at delphi.org.nz]
> On Behalf Of Alister Christie
>
> Is there a nice easy function to convert a delphi string to one that is
> suitable for rendering in a browser (converting "&" to"&"  etc...).
>
> _______________________________________________
> NZ Borland Developers Group - Delphi mailing list
> Post: delphi at delphi.org.nz
> Admin: http://delphi.org.nz/mailman/listinfo/delphi
> Unsubscribe: send an email to delphi-request at delphi.org.nz with Subject: unsubscribe
>
>
_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: delphi at delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to delphi-request at delphi.org.nz with Subject: 
unsubscribe




More information about the Delphi mailing list