You escape a quote character by putting a \ in front of it. addQuote('This link don\'t work!');
Karl Rudd On Wed, Sep 17, 2008 at 5:51 PM, Shawn <[EMAIL PROTECTED]> wrote: > > When I have a string that contains an apostrophe, whats the best way > to handle it? Should I remove it? replace it? encode it? escape it? > > For example, this function call throws the following error: > > Function: > addQuote('This video don't work!'); return false; > > Error: > missing ) after argument list > addQuote('This link don't work!'); return false; > > Whats the best way to handle this scenario? > > PS - Sorry if I double posted this : / I'm just figuring out this > whole group thing :) > > Thanks, > > --shawn >