WordPress.org

Forums

The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

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

  1. Cnoz79
    Member
    Posted 5 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 5 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 5 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. David Davis
    Member
    Plugin Author

    Posted 4 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • TweetButton
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic