title: javascript escape quotes and vars
body: <p>I have the following piece of code that appends on different divs data from mysql but I have a problem with adding the image I can't escape the " correctly.</p>
  
  <pre><code>   $(document).on("click", ".active-modal", function () {
       var queryId = $(this).data('uri');
       $.ajax({
         url: '/catalog/product/modal-ajax',
         type: 'POST',
         dataType: 'json',
         async: true,
         data: {productId: queryId},
         success: function(data) {
            for (var key in data) {
              $('.product-name').text(data.ProductName);
              $('.product-code').text(data.BexProductCode);
              $('&lt;img src="img/door-right.png"&gt;').appendTo(".ball_footballbox");
              $('&lt;img src="/public/uploads/productPictures/thumbnails/" '+ data.ProductImage +' "&gt;');
            }
         }
       })
       .fail(function() {
         console.log("error");
       })
     });
  </code></pre>