Apostrophe issues in custom top content

I was wondering if anybody else has encountered this issue and has a solution. When i have a field in the top content for a custom entity that contains an apostrophe for example the name O'Connor. There is an error in the top content that causes the top content to not render. It doesn't seem to cause a problem on system screens like the person screens, just on custom entities. I'm assuming the character is not being escaped some how and I'm not sure how to go about resolving the issue. I'm currently experiencing this issue on Sage CRM 7.2.e.3.