Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What function turns normal text into HTML text? 2

Status
Not open for further replies.

MagicFrisbee

Programmer
Feb 22, 2006
74
US
Is there a function that changes a normal string of text into a string of text with entities in it? For instance, if I have a string that contains a left bracket in it, the function should see that and return a string that has an ampersand, then an 'l', then a 't', then a semicolon, all in place of the left bracket.

Other common entities would also be replaced, like quotes, ampersands, and right brackets.
 
Not sure where to find it in Delphi, but the function/method is almost universally named HTMLEncode.
 
The method is not in Delphi 2006's Win32 Help, nor in Delphi 7's help. But the method exists for public use in the HTTPApp unit and works just like I hoped it would. Thank you, HareBrain! And so quick!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top