Using Randomized Blogroll Plugin on UTF-8 encoded pages

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;

Posted on June 20, 2005 in


Comment by Malte Diedrich

June 20, 2005 - 22:46

Well, thank you for the Plugin.


Comment by had

June 5, 2007 - 17:59

10x.. it solved all my problems