LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File awstats-3473378-urldecode.patch of Package awstats (Project network:utilities)

diff -ur awstats-7.0.99.beta2-orig/wwwroot/cgi-bin/awstats.pl awstats-7.0.99.beta2/wwwroot/cgi-bin/awstats.pl
--- awstats-7.0.99.beta2-orig/wwwroot/cgi-bin/awstats.pl	2012-02-15 15:19:22.000000000 +0100
+++ awstats-7.0.99.beta2/wwwroot/cgi-bin/awstats.pl	2012-07-17 13:16:52.281894559 +0200
@@ -31,6 +31,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
@@ -8793,7 +8794,7 @@
 				print "<a href=\""
 				  . XMLEncode("$newkey")
 				  . "\" target=\"url\" rel=\"nofollow\">"
-				  . 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
@@ -8808,7 +8809,7 @@
 				print "<a href=\""
 				  . XMLEncode("$urlprot://$SiteDomain$newkey")
 				  . "\" target=\"url\" rel=\"nofollow\">"
-				  . XMLEncode($nompage) . "</a>";
+				  . XMLEncode(uri_unescape($nompage)) . "</a>";
 			}
 			else {
 				print XMLEncode($nompage);
Only in awstats-7.0.99.beta2/wwwroot/cgi-bin: awstats.pl.orig