]> xenbits.xensource.com Git - people/aperard/osstest.git/commitdiff
history reporting (nfc): Break out url_unquote
authorIan Jackson <ian.jackson@eu.citrix.com>
Mon, 10 Aug 2020 16:13:10 +0000 (17:13 +0100)
committerIan Jackson <ian.jackson@eu.citrix.com>
Wed, 19 Aug 2020 10:41:18 +0000 (11:41 +0100)
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Osstest/HistoryReport.pm

index f30ded5bba882f81ca1533861fa1c889c282f841..f8a499555132e298006095adac7d9f8358a2e953 100644 (file)
@@ -147,8 +147,7 @@ sub cache_read_previous ($) {
            }
            s{^(\w+)=}{} or die "$orig -- $_ ";
            my $k = $1;
-           s{\%([0-9a-f]{2})}{ chr hex $1 }ge;
-           $ch->{$k} = $_;
+           $ch->{$k} = url_unquote($_);
        }
        push @previous, $jr;
        $cache{key($jr)} = $jr;
@@ -156,6 +155,12 @@ sub cache_read_previous ($) {
     close H;
 }
 
+sub url_unquote ($) {
+    local ($_) = "$_[0]";
+    s{\%([0-9a-f]{2})}{ chr hex $1 }ge;
+    $_;
+}
+
 sub url_quote ($) {
     local ($_) = "$_[0]";
     s{[^-+=/~:;_.,\w]}{ sprintf "%%%02x", ord $& }ge;