I'm having a slight struggle with the og:title tag on my website. Whenever an article title has an apostrophe and gets shared on Facebook, '
shows up instead of the apostrophe. I've compared my meta tags to a friend's site that successfully shows his apostrophes and the only difference I can find is this:
Code for apostrophes placed in the og:title for my site:
'
Code for apostrophes placed in the og:title for friend's site:
'
I think my site is converting the ampersand after having already converted the apostrophe, and that is making it show up as '
on Facebook.
I'm using K2 for Joomla!, and have asked this question on their forums but I haven't received a single reply in 5 days now.
This is the code I found in the com_k2>views>item>view.html.php file:
$document->setMetaData('og:title', htmlspecialchars($document->getTitle(), ENT_QUOTES, 'UTF-8'));
I'm not php savvy, is there any way I can change this so the code will show up right? If it helps, here's a link to an article with an apostrophe in the title from the site.
Thank you for your time.