Jump to content

Product review does not display special char


Stevanovich

Recommended Posts

Hi Stevanovich,

I think I have the same issue. I noticed that it occurs only when the product description is truncated, as we can see in the attached screen copy:

product_info.png.868ba9db3902fe2b051bdbbbde4e10ea.png

 

Hope this will help to find a solution.

Kind regards

Benjamin

Link to comment
Share on other sites

CC618 will use the product's Short Description if it exists. If not, the product's Main Description will be used after stripping away all HTML tags.

Whichever is used, if the description needs truncating, the first action is to decode entities, such as " to a quote mark. But the use of this function employs the ENT_COMPAT filter which does not convert the apostrophe - &#39.

The second action is to discard everything after the product precis limit.

The third action is to re-encode all the entities. The use of this function will see &#39 and encode the ampersand - '. Thus, at the browser, after decoding &, we still see '.

In the file /classes/catalogue.class.php, near line 218:

Find:
return htmlentities(substr(html_entity_decode($short_description, ENT_COMPAT, 'UTF-8'), 0, $product_precis), ENT_QUOTES, 'UTF-8').'…';

Change to:
return htmlentities(substr(html_entity_decode($short_description, ENT_QUOTES, 'UTF-8'), 0, $product_precis), ENT_QUOTES, 'UTF-8').'…';

This will be fixed in CC619.

  • Thanks 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...