Single and double quote issues

Results 1 to 2 of 2

Thread: Single and double quote issues

  1. #1
    gzazJim Guest

    Default Single and double quote issues

    Greetings all.<BR><BR>I thought this may help someone with form-related problems.<BR><BR>Forms with text-fields or textarea input can, as you all know, cause problems when have &#039; or " in their input. The following is a slight variation on a Wrox solution, and it seems to work best when user-input information needs to be edited:<BR><BR>Function newString(theString)<BR> newString = Replace(Replace(theString, "&#039;", "&acute;"), CHR(34), "&quot;")<BR>End Function<BR><BR>Dim txtString<BR>txtString = newString(Request.Form("txtFieldName"))<BR><BR>The variable "txtString" should now display correctly, and be editable should the data need to be changed. The Wrox solution of changing &#039; to &#039;&#039; caused problems when re-editing the information from a database.<BR><BR>Please let me know if this has been of any help whatsoever.<BR><BR>Regards,<BR><BR>Jim

  2. #2
    gzazJim Guest

    Default RE: Single and double quote issues

    Bloody Heck - I&#039;m not entirely sure how this got double-posted... I only hit "Post" once...<BR><BR>My apologies.<BR><BR>Jim

Posting Permissions

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