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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using escape and urlencode

Status
Not open for further replies.

Microbe

Programmer
Oct 16, 2000
607
AU
Hey everyone,

Having a problem when entering a text field that may contain a "'" (single quote).

Obviously it needs to be parsed out somehow, however, when I use replace() it just plain doesn't work, so I tried using escape and server.urlencode. It works, but when then pulling the record out of the database it shows the encoding i.e. %20 rather than the character.

It is beginning to become a pain as I go in circles trying to resolve the issue.

Any ideas/suggestions/code?

Thanks heaps in advance...

Microbe

Steve Davis
hey.you@hahaha.com.au
 
Hi.

It was a problem for me too, when I used queries and built from more than one string.
Try to replace the " signs to (which are in text and not a border of an query) to \" and the ' to \'. If you use browser to display, it works.
for exam.:
<Script ....>

alert(&quot;This is a \&quot; quat. mark between quats&quot;);
</Script>


regards, Kirilla
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top