trouble with replacing quotes

Results 1 to 2 of 2

Thread: trouble with replacing quotes

  1. #1
    Join Date
    Dec 1969

    Default trouble with replacing quotes

    Please forgive me if this is answered in the FAQ&#039;s, but I looked and didn&#039;t find an answer that worked.<BR><BR>I have an HTML textbox that clients are going to paste text into from Word, and some of this text from Word will have single and double quotes in it. I need to then insert this text the clients pastes into my database, but I&#039;m having trouble with the double quotes. Here&#039;s some of my code...<BR><BR>strArticle = Request.Form("article")<BR>strArticle = Replace(strArticle,"&#039;","&#039;&#039;") &#039; double up single quotes<BR>strArticle = Replace(strArticle,""","""") &#039; double up double quotes<BR><BR>...and then I use an sql statement to insert this info into my database, but it always cuts off everything after the first quote. I tried using chr(34) but couldn&#039;t get that to work either. What am I doing worng?<BR><BR>Thanks in advance for any help!

  2. #2
    Join Date
    Dec 1969

    Default RE: trouble with replacing quotes

    Can you try using the Server.URLEncode function? It seems to get anything into a usable format.<BR><BR>newvariable = Server.URLEncode(oldvariable)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts