The like module cannot render the meta tag for page title correctly if there is a quote " character in the title. The same problem may apply to other modules, i haven't checked. The fix is simple:
In file:
fb_social_like.module
change the line:
$data = '<meta property="og:title" content="'. $object -> title. '"/>' ."\n";
to:
$data = '<meta property="og:title" content="'. htmlspecialchars($object -> title). '"/>' ."\n";

htmlspecialchars() will ensure that any HTML entities in the title are rendered correctly.

Comments

dimension7’s picture

Version: 6.x-6.x-dev » 6.x-1.0-beta4
chia’s picture

Status: Active » Needs review
StatusFileSize
new1.07 KB

Here a patch to fix this

ferdi’s picture

ferdi’s picture

Status: Needs review » Closed (fixed)
pedrochristopher’s picture

It seems this fix corrects some HTML characters but not some others. For instance the ' character is in my tests not fixed. You can click the share button on http://samaritanmag.com/1006/pancake-punchlines-lead-pancakes-penner-la-... and see that the title is not correct.