Support » Plugin: Yoast SEO » [Plugin: WordPress SEO by Yoast] Characters in og:description are replaced with "?" (&

  • Hey,

    I started using romanian diacritics today, and saw that in the og:description tag certain characters (e.g. “ăĂțȚ”) are replaced with a quation mark.

    _yoast_wpseo_opengraph-description is empty; the post excerpt display on the frontpage correctly.

    The error originates in /inc/wpseo-functions.php, line 156:
    '%%excerpt%%' => ( !empty( $r->post_excerpt ) ) ? strip_tags( $r->post_excerpt ) : utf8_encode( substr( strip_shortcodes( strip_tags( utf8_decode( $r->post_content ) ) ), 0, 155 ) ),

    utf8_decode() fails to convert those characters to ISO-8859-1, so I removed that:
    '%%excerpt%%' => ( !empty( $r->post_excerpt ) ) ? strip_tags( $r->post_excerpt ) : substr(strip_shortcodes(strip_tags($r->post_content)), 0, 155),

    Cheers,
    Alex

    http://wordpress.org/extend/plugins/wordpress-seo/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: WordPress SEO by Yoast] Characters in og:description are replaced with "?" (&’ is closed to new replies.