escaping double quotes RRS feed

  • General discussion

  • I'm using search.asmx and FQL to get query results. It works fine.

    I'm building the query using c# and I have double quotes around everything. How do I handle situations where an end user enters double quotes in their search string?

    I.e. I have something like "field1:string(\" + enteredValue + "\", mode=\"phrase\")";

    if enteredValue is  

    "Fishing" with bait  

    then I get "field1:string("Fishing" with bait, mode="phrase")"; and obviously this won't work.

    Tuesday, February 19, 2013 1:19 PM