I am passing the following to my extjs grid.
how do i escape if there any quotes inside the varaible.
append rval "'description':'$description',"
append rval "'short_description':'$shortDescription',"
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Well you could use regsub to substitute all the single quotes e.g.
The first line will place a backslash in front of every apostrophe in the rval variable. The second line will place a backslash in front of every double quote. You have to escape the apostrophe, the double quote and the backslash itself in the regsub command too, hence the triple backslash in the 2nd last argument to regsub