Open-source eCommerce platform for C# and ASP.NET Core 10 with MongoDB. Build multi-store shops and multi-vendor marketplaces with B2B/B2C, REST API, plugins, Vue 3 and Docker.
C# aspnet-corecsharpdockerdotnetecommerceecommerce-platformmongodbmulti-storemulti-vendornosqlonline-shopshoppingcart
Show hyperlink only if the product is individually visible. (#377)
Nikhil Scaria662da2b6614b
diff --git a/src/Business/Grand.Business.Catalog/Services/Products/ProductAttributeFormatter.cs b/src/Business/Grand.Business.Catalog/Services/Products/ProductAttributeFormatter.csindex ce47258d7..dcb7bf720 100644--- a/src/Business/Grand.Business.Catalog/Services/Products/ProductAttributeFormatter.cs+++ b/src/Business/Grand.Business.Catalog/Services/Products/ProductAttributeFormatter.cs@@ -105,13 +105,13 @@ namespace Grand.Business.Catalog.Services.Productsif (i > 0)result.Append(separator);- if (htmlEncode)+ if (p1.VisibleIndividually){- result.Append($"<a href=\"{p1.GetSeName(langId)}\"> {WebUtility.HtmlEncode(p1.GetTranslation(x => x.Name, langId))} </a>");+ result.Append($"<a href=\"{p1.GetSeName(langId)}\"> {(htmlEncode ? WebUtility.HtmlEncode(p1.GetTranslation(x => x.Name, langId)) : p1.GetTranslation(x => x.Name, langId))} </a>");}else{- result.Append($"<a href=\"{p1.GetSeName(langId)}\"> {p1.GetTranslation(x => x.Name, langId)} </a>");+ result.Append($"{(htmlEncode ? WebUtility.HtmlEncode(p1.GetTranslation(x => x.Name, langId)) : p1.GetTranslation(x => x.Name, langId))}");}var formattedAttribute = await PrepareFormattedAttribute(p1, customAttributes, langId, separator, htmlEncode,renderPrices, allowHyperlinks, showInAdmin);