WordPress.org

Ready to get started?Download WordPress

Forums

TweetButton
[resolved] Doesn't work if there is a "%" in the title (4 posts)

  1. Cnoz79
    Member
    Posted 3 years ago #

    I tried to use it with a article about A/B-Testint (Title: "60% increase...") and it didn't work (the buton showed but in the wrong language, without the counter and if you clicked on it nothing happend.

    Any chance to fix this?

    http://wordpress.org/extend/plugins/tweetbutton-for-wordpress/

  2. gsakurai
    Member
    Posted 2 years ago #

    You can fix it at tweetbutton.php

    change the line
    $button .= '&text='.$title;
    to this
    $button .= '&text='.urlencode($title);

  3. gsakurai
    Member
    Posted 2 years ago #

    Well, I see another problems so it's better forget the first fix

    Put this lines
    $arrIni = array("%","?","#");
    $arrEnd = array("%25","%3f","%23");
    $title = str_replace($arrIni, $arrEnd, $title);
    before
    $button .= '&text='.$title;

  4. dcgws
    Member
    Plugin Author

    Posted 2 years ago #

    Hi, just updated the plugin. Have incorporated your fixes.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic