fix utf8 decoding
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
This commit is contained in:
parent
5b7a14fb4d
commit
10bb903660
@ -14,9 +14,10 @@ use CGI::Util qw(unescape);
|
|||||||
use CGI::Carp qw(fatalsToBrowser);
|
use CGI::Carp qw(fatalsToBrowser);
|
||||||
use Encode;
|
use Encode;
|
||||||
use Fcntl ':mode';
|
use Fcntl ':mode';
|
||||||
|
binmode STDOUT, ':utf8';
|
||||||
|
|
||||||
my $cgi = new CGI;
|
my $cgi = new CGI;
|
||||||
my $version = "252";
|
my $version = "253";
|
||||||
my $my_url = $cgi->url();
|
my $my_url = $cgi->url();
|
||||||
my $my_uri = $cgi->url(-absolute => 1);
|
my $my_uri = $cgi->url(-absolute => 1);
|
||||||
my $rss_link = "";
|
my $rss_link = "";
|
||||||
@ -217,8 +218,8 @@ sub esc_url {
|
|||||||
|
|
||||||
sub esc_html {
|
sub esc_html {
|
||||||
my $str = shift;
|
my $str = shift;
|
||||||
$str = escapeHTML($str);
|
|
||||||
$str = decode("utf8", $str, Encode::FB_DEFAULT);
|
$str = decode("utf8", $str, Encode::FB_DEFAULT);
|
||||||
|
$str = escapeHTML($str);
|
||||||
return $str;
|
return $str;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user