Facebook Like Button
og:description not correctly encoded (1 post)

  1. Pedro Lamas
    Posted 3 years ago #


    I see you changed the fun.inc.php, line 65 to now use the @htmlentities function, but that is not enough since you should specify the charset encoding!

    My blog uses UTF-8, so Facebook gets all messy with the description on the default ISO encoding...

    I changed the full line to:

    <meta property="og:description" content="'.@htmlentities(@trim(substr(strip_tags($post_by_id['post_content']), 0, 140)), ENT_COMPAT | ENT_HTML401, "UTF-8").'"/>

    I fixed the "UTF-8" string there, but I'm sure there is some global constante in wordpress with the correct value...


Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic