You are hereHome / WordPress Plugins / Using Randomized Blogroll Plugin on UTF-8 encoded pages

Using Randomized Blogroll Plugin on UTF-8 encoded pages


By Gerd Riesselmann - Posted on 20 June 2005

Malte Diedrich noticed, my Randomized Blogroll plugin causes problems on pages that are not ISO-8859-1. He's right.

Thankfully Malte already provides a simple solution. Just change the function getAnchorHTML() to look like this:

<?php
function getAnchorHTML()
{
  return
utf8_encode('<a ' .
                    
'href="/'; . $this->url . '" ' .
                    
'title="' . htmlspecialchars($this->description, ENT_COMPAT) . '" ' .
                    
'rel="bookmark">' .
                    
$this->name .
                    
'</a>');
}
?>

Thanks a lot, Malte!

Update: Replacing > with &gt;

Well, thank you for the Plugin.

10x.. it solved all my problems

Topics