After getting image name as response from ajax call (image name:Logo, JGP - lille70720150924032031.jpg) from controller to index.html.twig in symfony2,putting the image to a javascript table variable as bellow.
data[index].Interestlogo=image name;
table="";
table += "<div class='imgparam th' style='background-image: url({{basepath}}/uploads/Interests/"+data[index].Idinterestmaster+"/thumbnails/"+data[index].Interestlogo+")'></div>";
$("#results").append(table);
here everything is working fine for all normal image names. if image name=Logo, JGP - lille70720150924032031.jpg then image is not displaying.
here I need to put a double quotes as bellow background-image: url(" path should sit here ");
What I am getting is as bellow background-image: url(path should sit here);//double quotes not there
Please suggest me,how to put double quotes.