WordPress.org

Ready to get started?Download WordPress

Forums

WordPress SEO by Yoast
Characters in og:description are replaced with "?" (& (2 posts)

  1. Armin Ro?u
    Member
    Posted 1 year ago #

    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/

  2. Armin Ro?u
    Member
    Posted 1 year ago #

    Update: as of WordPress Seo version 1.2.8.6, this is line 165

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic