Facebook Like Plugin HTML Entities
I installed the new Like plugin on my Wordpress blog. I also have the Open Graph Plugin for Wordpress installed.
It all works magically except that the HTML special characters are showing on my Facebook Wall when I click like.
I tried preventing the Open Graph plugin from encoding the content of the mega tag in the first place by editing the php for the plugin.
I changed:
return "<meta property=\"{$property}\" content=\"".htmlentities($content)."\" />";
to:
return "<meta property=\"{$property}\" content=\"".$content."\" />";
and then trie开发者_JS百科d:
return "<meta property=\"{$property}\" content=\"".htmlspecialchars_decode($content)."\" />";
But no luck
Any suggestions?
I wouldn't advise removing the HTML encoding of the content variable, use esc_html().
The problem is either in Facebook's own Like plugin, or the WordPress one (i.e. taking data from the source, modifying it, and saving it).
Which exact WordPress plugin are you using for Like?
精彩评论