Closed jefflenz closed 5 years ago
/vendor/klaviyo/magento2-extension/view/frontend/templates/product/viewed.phtml
Does not escape the product name, produces js error if product has double quote in name.
var item = { ProductID: "<?php echo $_product->getId(); ?>", Name: "<?php echo $_product->getName(); ?>", SKU: "<?php echo $_product->getSku(); ?>", URL: "<?php echo $_product->getProductUrl(); ?>", Price: <?php echo number_format($price, 2); ?>, FinalPrice: <?php echo number_format($final_price, 2); ?>, <?php if ($_product_image_url) { ?>ImageURL: "<?php echo $_product_image_url; ?>", <?php } ?> Categories: <?php echo $this->getProductCategoriesAsJson(); ?> };
just resolved this with latest release
/vendor/klaviyo/magento2-extension/view/frontend/templates/product/viewed.phtml
Does not escape the product name, produces js error if product has double quote in name.
var item = { ProductID: "<?php echo $_product->getId(); ?>", Name: "<?php echo $_product->getName(); ?>", SKU: "<?php echo $_product->getSku(); ?>", URL: "<?php echo $_product->getProductUrl(); ?>", Price: <?php echo number_format($price, 2); ?>, FinalPrice: <?php echo number_format($final_price, 2); ?>, <?php if ($_product_image_url) { ?>ImageURL: "<?php echo $_product_image_url; ?>", <?php } ?> Categories: <?php echo $this->getProductCategoriesAsJson(); ?> };