WordPress.org

Ready to get started?Download WordPress

Forums

TwitPress truncates tweets when it encounters '&' (2 posts)

  1. neville
    Member
    Posted 6 years ago #

    TwitPress is excellent and does exactly what it's supposed to do, no fuss.

    However, I notice that if you have a post with an '&' in the post title, TwitPress stops when it hits the '&' symbol and doesn't output the complete title nor the tiny url.

    For example, I publish a podcast called The Hobson & Holtz Report. When I publish a post, TwitPress tweets that as just 'New blog post: The Hobson' like this -

    http://twitter.com/jangles/statuses/849937307

    Does anyone know how I can fix that? Thanks.

  2. loothi
    Member
    Posted 5 years ago #

    Yes, in function twitpress_get_message( $postID )

    at line 248

    replace:
    $proto = str_replace( "[title]", $post->post_title, $proto );
    with
    $proto = str_replace( "[title]", urlencode($post->post_title), $proto );

    We had this bug using Twitpress from our Journalism News blogs http://blogs.journalism.co.uk/editors/
    to our twitter page http://twitter.com/journalismnews

    but it now works fine for us.

    Cheers!
    ~loothi

Topic Closed

This topic has been closed to new replies.

About this Topic