File awstats-3473378-urldecode.patch of Package awstats

Index: awstats-7.8/wwwroot/cgi-bin/awstats.pl
===================================================================
--- awstats-7.8.orig/wwwroot/cgi-bin/awstats.pl
+++ awstats-7.8/wwwroot/cgi-bin/awstats.pl
@@ -30,7 +30,7 @@ use Time::Local
 use Socket;
 use Encode;
 use File::Spec;
-
+use URI::Escape; # Debian package: liburi-perl
 
 #------------------------------------------------------------------------------
 # Defines
@@ -8884,7 +8884,7 @@ sub HTMLShowURLInfo {
 				print "<a href=\""
 				  . XMLEncode("$newkey")
 				  . "\" target=\"url\" rel=\"nofollow noopener noreferrer\">"
-				  . 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
@@ -8899,7 +8899,7 @@ sub HTMLShowURLInfo {
 				print "<a href=\""
 				  . XMLEncode("$urlprot://$SiteDomain$newkey")
 				  . "\" target=\"url\" rel=\"nofollow noopener noreferrer\">"
-				  . XMLEncode($nompage) . "</a>";
+				  . XMLEncode(uri_unescape($nompage)) . "</a>";
 			}
 			else {
 				print XMLEncode($nompage);
openSUSE Build Service is sponsored by