cancel
Showing results for 
Search instead for 
Did you mean: 

Issue in product title with special chars in mini cart

Issue in product title with special chars in mini cart

Steps to reproduce

  1. create a product titled Fusion Backpack &trade
  2. go to front end the product title comes up correctly as Fusion Backpack ™ then add it to cart
  3. in the mini cart it shows it as Fusion Backpack ™ and not converting &trade to ™

errr.png

3 REPLIES 3

Re: Issue in product title with special chars in mini cart

Hi @Nethues_Sunil,

 

I guess the issue is because you'll find something like this into the code:

 

<?php echo $block->escapeHtml($block->getProductName()) ?>

(I guess that is the problem in this case)

 

What if you store the name in Unicode?

Re: Issue in product title with special chars in mini cart

Hi @Damian Culotta,

 

I am aware of the method escapeHtml but as the minicart template is rendered using knockout it cannot be used here, i also checked the model from where the values are sent to the template and there is no escapeHtml method used there.

 

Thanks for your answer though.

 

Regards

Sunil

Re: Issue in product title with special chars in mini cart

If it is coming through knockout. You can try "html" binding as suggested here https://stackoverflow.com/questions/16674924/special-characters-in-bound-knockout-data-model

<span data-bind="html: test"></span>

var vm = {    test: ko.observable("48 &deg; f")
};ko.applyBindings(vm);

working fiddle link: http://jsfiddle.net/svu82/

 

If this solves your problem please give Kudos and Accept it as solution