[Templates] Incorrect UTF-8 string escape.

Gea-Suan Lin gslin@gslin.org
Sat, 7 Jul 2007 03:41:13 +0800


Hello,

In Template/Filters.pm, function uri_filter:

    if ($] >= 5.008) {
        utf8::encode($text);
    }

If $text is already UTF-8 string (utf8::is_utf8($text) is true), then
this will break $text.

Change to utf8::upgrade($text); will fix the problem.

-- 
* Gea-Suan Lin  (public key: Using https://keyserver.pgp.com/ to search)
* If you cannot convince them, confuse them.           -- Harry S Truman