SI
SI
discoversearch

We've detected that you're using an ad content blocking browser plug-in or feature. Ads provide a critical source of revenue to the continued operation of Silicon Investor.  We ask that you disable ad blocking while on Silicon Investor in the best interests of our community.  If you are not using an ad blocker but are still receiving this message, make sure your browser's tracking protection is set to the 'standard' level.
SI - Site Forums : Silicon Investor - Welcome New SI Members!

 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext  
To: SI Dave who wrote (21543)10/9/2004 2:24:09 AM
From: Jeffrey S. Mitchell  Read Replies (2) of 32873
 
Switching the ASP delimiter to (double) double-quotes works, but that isn't very elegant since it just shifts the problem from records with single quotes to those with double quotes.

Aha! It finally hit me. Single quotes are *not* one of the characters affected by HTMLEncode, so unless you use double quotes you are always going to have the problem trying to trap apostrophes! In other words, go back to using HTMLEncode but enclose the value in double, not single, quotes (like in my original example).

Here's a link to what's encoded:
msdn.microsoft.com

- Jeff
Report TOU ViolationShare This Post
 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext