Having an issue on our website at the minute. We have a button to allow users to share our news articles to Twitter. When tweeted it displays summary card and automatically generates the article title as the tweet.
However, if the article title contains punctuation marks such as apostrophes or quotation marks it displays HTML character codes instead. For example, see this post...
http://www.thisisardee.ie/2017/07/16/shane-finn-meant-raising-e200000-id/
I'm wondering if there is a way to automatically translate these codes to the correct characters to prevent people from tweeting things that are not legible.
Any help would be hugely appreciated.
The code is use for our Twitter button is...
<a class="twitter-share-button" href="<?php echo get_the_permalink(); ?>?text=<?php echo urlencode( get_the_title() ); ?>" data-via="ThisIsArdee"
data-related="ThisIsArdee">Tweet</a>