I have a little fight with the og: title tag on my site. Whenever the title of an article has an apostrophe and is shared on Facebook, ' appears instead of the apostrophe. I compared my meta tags with another site that successfully displays its apostrophes, and the only difference I can find is this:
The code for the apostrophes, placed in the og: title for my site: '
The code for the apostrophes, placed in the og: title for the friend’s site: '
I think my site converts an ampersand after it has already converted an apostrophe, and this makes it display as ' on Facebook.
I use K2 for Joomla !, and asked this question in my forums, but I did not receive a single answer after 5 days.
This is the code I found in the file com_k2> views> item> view.html.php:
$document->setMetaData('og:title', htmlspecialchars($document->getTitle(), ENT_QUOTES, 'UTF-8'));
I do not fit php, can I change this so that the code appears correctly? If this helps, here is a link to the article with an apostrophe in the header from the site.
Thank you for your time.
source share