Package: awstats
Version: 7.0~dfsg-2
Dear awstats maintainer,
I have noticed that awstats does not decode e.g. URLs containing
Cyrillic characters, leaving them URL-encoded:
/w/%D1%81%D0%B5%D0%BC%D1%8C%D1%8F
For me it is nice to see this link decoded:
/w/семья
I am attaching simple patch that solves this problem.
--
With best regards,
Dmitry
--- awstats.pl.orig 2011-10-16 16:29:59.728857013 +0200
+++ awstats.pl 2011-11-03 12:49:18.945971378 +0100
@@ -18,6 +18,7 @@
; # use Time::Local 'timelocal_nocheck' is faster but not supported by all
Time::Local modules
use Socket;
use Encode;
+use URI::Escape; # Debian package: liburi-perl
#------------------------------------------------------------------------------
# Defines
@@ -8790,7 +8791,7 @@
print "<a href=\""
. XMLEncode("$newkey")
. "\" target=\"url\">"
- . XMLEncode($nompage) . "</a>";
+ . XMLEncode(uri_unescape($nompage)) . "</a>";
}
elsif ( $newkey =~ /^\// )
{ # URL seems to be an url extracted from a web or wap
server log file
@@ -8805,7 +8806,7 @@
print "<a href=\""
. XMLEncode("$urlprot://$SiteDomain$newkey")
. "\" target=\"url\">"
- . XMLEncode($nompage) . "</a>";
+ . XMLEncode(uri_unescape($nompage)) . "</a>";
}
else {
print XMLEncode($nompage);