0

I have added the © symbol to product names in Magento 2. These all appear fine on the category and product pages, however when I add an item to my wishlist the product name appears with the text & copy; rather than the actual © symbol in the wishlist sidebar widget. The same applies to the recently ordered sidebar widget. See below screenshot demonstrating this:

enter image description here

Does anyone know how we can convert these HTML entities to the correct symbol in the sidebar widgets?

1 Answer 1

1

Try this by changing the data-bind text to html in all the files wherever knockout is used. See below example.

Wishlist Sidebar

Copy the file vendor\magento\module-wishlist\view\frontend\templates\sidebar.phtml to your custom theme.

From,

<strong class="product-item-name">
  <a data-bind="attr: { href: product_url }" class="product-item-link">
     <span data-bind="text: product_name"></span>
  </a>
</strong>

To,

<strong class="product-item-name">
  <a data-bind="attr: { href: product_url }" class="product-item-link">
     <span data-bind="html: product_name"></span>
  </a>
</strong>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.