Skip to main content
Inspiring
August 25, 2008
Question

Quotation replacement conundrum

  • August 25, 2008
  • 1 reply
  • 278 views
I have some data stored in a database (user inputted data). I need to display this data within xml, and I need all the quotation marks removed (since that would mess up the xml). The logical replacement (to make it look roughly as the user intended) is to replace the quotation marks with apostrophes. But I run into a problem when I try to use REPLACE (see code below). You'll note I end up with 3 apostrophes in a row in my code. Any ideas on how to handle this?
    This topic has been closed for replies.

    1 reply

    Inspiring
    August 25, 2008
    First, take away the octothorps, you don't need them.
    Next, surround the apostrophe with double quotes instead of single quotes.