[jQuery] Escaping the apostrophe

2008-09-17 Thread Shawn
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 a

[jQuery] Escaping the apostrophe

2008-09-17 Thread Shawn Molloy
When I have a string that contains an apostrophe, whats the best way to handle it? For example, this function call throws the following error: Function: onclick="addQuote('This video don't work!'); return false;" Error: missing ) after argument list addQuote('This link don't work!'); return fal