WordPress.org

Support

Support » Plugins and Hacks » WordPress Popular Posts » [Resolved] [Plugin: WordPress Popular Posts] WordPress Popular Posts 2.1.3: Problem with Special Characters

[Resolved] [Plugin: WordPress Popular Posts] WordPress Popular Posts 2.1.3: Problem with Special Characters

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi Martin,

    Please follow these instructions and let me know if it fixes the issue:

    1. Open wordpress-popular-posts.php using an editor such as Windows’ Notepad or Adobe Dreamweaver.
    2. Around line 622, find and change this:
      $tit = stripslashes($tit);
      $title_attr = htmlentities($tit, ENT_QUOTES);
      
      if ( $instance['shorten_title']['active'] && (strlen($tit) > $instance['shorten_title']['length'])) {
      	$tit = mb_substr($tit, 0, $instance['shorten_title']['length'], 'UTF-8') . "...";
      }
      
      $tit = htmlentities($tit, ENT_QUOTES);

      … into this:

      $tit = stripslashes($tit);
      $title_attr = htmlentities($tit, ENT_QUOTES, 'UTF-8');
      
      if ( $instance['shorten_title']['active'] && (strlen($tit) > $instance['shorten_title']['length'])) {
      	$tit = mb_substr($tit, 0, $instance['shorten_title']['length'], 'UTF-8') . "...";
      }
      
      $tit = htmlentities($tit, ENT_QUOTES, 'UTF-8');
    3. Save changes.

    cheers thx ikki

    Thank you, Ikki24, the suggested UTF-8 amendment of wordpress-popular-posts.php fixed the issue.

    WordPress Popular Posts 2.1.4 will detect automatically the charset used on your blogs so you won’t have to change it manually. Will release it within the next couple of days, so stay tuned!

    Thanks again, I have just upgraded to version 2.1.4 and the problem is definitely no longer reproducible. Great job, thank you!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Resolved] [Plugin: WordPress Popular Posts] WordPress Popular Posts 2.1.3: Problem with Special Characters’ is closed to new replies.
Skip to toolbar