Stevanovich Posted July 26, 2017 Share Posted July 26, 2017 Hello, I am testing review about any product , i meet problem with sending special char , like < ' > transform to <'> Maybe something with encoding ? I put a link to see Testing and result Thanks Regards Quote Link to comment Share on other sites More sharing options...
benjAeby Posted July 27, 2017 Share Posted July 27, 2017 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: Hope this will help to find a solution. Kind regards Benjamin Quote Link to comment Share on other sites More sharing options...
bsmither Posted July 28, 2017 Share Posted July 28, 2017 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 - '. 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 ' and encode the ampersand - &#39;. 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. 1 Quote Link to comment Share on other sites More sharing options...
benjAeby Posted July 28, 2017 Share Posted July 28, 2017 Hi BSmither, Thank your for your quick and detailed answer. Great fix! Best regards Benjamin Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.