Not displaying apostrophe properly.

When I create a task (and various other record types) apostrophies do not display properly in descriptions.

For example, if I enter Isn’t in the subject of a task as well as the description, it will display properly in the subject but display it’s in the description.

Any ideas how to stop this?

Cheers
David

Hi,

We’re aware of this issue, but thanks for highlighting it further!

There is an Issue for this logged on our Github: https://github.com/salesagility/SuiteCRM/issues/655

Hi there, we have created a fix for this so this should be included in future releases.

For immediate affect if you have access to your files edit the two following files:

include/Smarty/plugins/function.sugarvar.php
include/Smarty/plugins/modifier.escape.php

within include/Smarty/plugins/function.sugarvar.php

Replace:


if(!empty($displayParams['htmlescape'])){
	$_contents .= '|escape:\'html\'';
}

With:


 if(!empty($displayParams['htmlescape'])){
	$_contents .= '|escape:\'html\'';
}
if(!empty($params['htmlentitydecode'])){
	$_contents .= '|escape:\'html_entity_decode\'';
}

Then within file
include/Smarty/plugins/modifier.escape.php

Replace:


case 'html':
            return htmlspecialchars($string, ENT_QUOTES, $char_set);

With:


case 'html':
            return htmlspecialchars($string, ENT_QUOTES, $char_set);

case 'html_entity_decode':
            return html_entity_decode($string, ENT_QUOTES, $char_set);

Now do a Quick Repair & Build to refresh your modules’ template cache and the apostrophe should appear as expected within the description field when you view the record in Detail View.

Let us know if that works for you!

Hello,

It worked for most of the cases. But I already found 1 record when it’s still there, in the City address of the account module. But not for all the accounts … strange …

Hi there,
I have checked my code as have the fix in place but we are still having this same issue. '

I have done the repair & build but still same.

Thanks
Jamie

This issue should be re-opened based on the fact it is happening again in 7.9.2