Language: JavaScript
Label: safe
CWE: CWE-829 \u2014 Inclusion of Functionality from Untrusted Control Sphere
The product imports, requires, or includes executable functionality (such as a library) from a source that is outside of the intended control sphere.

Code:
    showProduct: function({container='#productListContainer', category='', brand='', edition='', generic='', author=''}='' ) {

        this.parseProductList({
            category:category, 
            brand:brand, 
            edition:edition,
            generic:generic,
            author:author
        }, productData => {
        
            // if no product found then display the error msg
            if(productData == null) {
                $(container).html("<div class='alert alert-danger'>Sorry! No products found in this criteria.</div>");
                return;
            }

            var productHtml = "";
            productData.forEach(product => {
                
                var productPhoto = full_website_address;
                if( product.v && product.v > 0 ) {
                    productPhoto += "/images/?for=products&id="+ product.id +"&q=YTozOntzOjI6Iml3IjtpOjIwMDtzOjI6ImloIjtpOjIyMDtzOjI6ImlxIjtpOjcwO30="+"&v="+ product.v;
                } else {
                    productPhoto += "/assets/images/noimage.png";
                }

                productHtml += "<button type='button' value='"+ product.id +"' title='"+ product.name +"' data-toggle='tooltip' class='productButton btn-product btn-default'> \
                                <img src='"+ productPhoto +"' style='width:60px; height:60px;' alt='"+ product.name +"'> \
                                <span> "+ product.name +" </span> \
                                </button> \
                                ";
            });

            // Now all the products display in the products container
            $(container).html(productHtml);

        });

    },