How to handle apostrophe?

crjunk

Member
What is the best way to handle an apostrophe when working with WebSpeed?

I've tried the following:
ASSIGN MyName = REPLACE(MyName, "'", "''").
But I just end up with: Joe''s Seafood

After a few post backs to the server, Joe''s Seafood eventually gets truncated down to Joe.

Thanks,
CR Junk
 

Casper

ProgressTalk.com Moderator
Staff member
Just quick answer:

HTMl-ENCODE() function does this for you (I believe). Or try replace ' with [FONT=verdana, arial]'[/FONT]


HTH,

Casper.
 

Casper

ProgressTalk.com Moderator
Staff member
Lol, forgot this was also HTML I tried to say try
replace ' with & # 39 ; (without the spaces) :awink:

Casper.
 

crjunk

Member
Thanks for your help. I tried using the HTML-ENCODE(), but this did not seem to work. I'm not sure that I'm following you on the replace ' with '. Could you elaborate a little more?

Thanks,
CR Junk
 

crjunk

Member
Hi Casper,

I tried using:
ASSIGN MyName = REPLACE(MyName, "'", "&#39").​

This seems to have solved the problem.

Thanks for your help!
CR Junk
 
Top