WordPress.org

Forums

Jetpack by WordPress.com
[resolved] Google Plus - can't handle Apostrophe in Author Name (2 posts)

  1. darrell.odonnell
    Member
    Posted 1 year ago #

    If there is an apostrophe in the g+ profile (e.g. Darrell O'Donnell <- me) the name will show with a \ (Darrell O\'Donnell).

    Here is a possible (works for me) fix:

    Change function byline:

    function byline( $post ) {
    		$author = $this->information( $post->post_author );
    		$image = '<img src="' . esc_url( $author['profile_image'] ) . '?sz=40" alt="" width="20" height="20" align="absmiddle" /> ';
    		$byline = sprintf( '<a href="%1$s">%2$s</a><a rel="author" href="%1$s" class="gplus-profile">%3$s</a>', esc_url( $author['url'] ), $image, esc_html( $author['name'] ) );
    		return apply_filters( 'gplus_authorship_byline', $byline, $post );
    	}

    TO:

    function byline( $post ) {
    		$author = $this->information( $post->post_author );
    		$image = '<img src="' . esc_url( $author['profile_image'] ) . '?sz=40" alt="" width="20" height="20" align="absmiddle" /> ';
    		$byline = sprintf( '<a href="%1$s">%2$s</a><a rel="author" href="%1$s" class="gplus-profile">%3$s</a>', esc_url( $author['url'] ), $image, stripslashes(esc_html( $author['name'] )) );
    		return apply_filters( 'gplus_authorship_byline', $byline, $post );
    	}

    http://wordpress.org/plugins/jetpack/

  2. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    Thanks for the report! We'll get this fixed in the next Jetpack update.

    Would you be interested in joining the Beta Group? We definitely need more Irishmen to break things while testing :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.