[tools] testbot/web: Tweak the main page's job details links.

Francois Gouget fgouget at codeweavers.com
Thu Apr 21 08:59:03 CDT 2022


There is no need to call uri_escape() on integers.
But GetDetailsLink() should go through escapeHTML() in case it contains
ampersands.

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---
See also the corresponding user details patch.
---
 testbot/web/index.pl | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/testbot/web/index.pl b/testbot/web/index.pl
index 0b8a9cb78..1c506c9b1 100644
--- a/testbot/web/index.pl
+++ b/testbot/web/index.pl
@@ -26,7 +26,6 @@ use ObjectModel::CGI::CollectionBlock;
 our @ISA = qw(ObjectModel::CGI::CollectionBlock);
 
 use POSIX qw(strftime);
-use URI::Escape;
 
 use WineTestBot::Branches;
 use WineTestBot::Users;
@@ -89,9 +88,9 @@ sub GenerateDataView($$$)
   }
   elsif ($PropertyName eq "Status")
   {
-    my $EscapedKey = uri_escape($Row->{Item}->GetKey());
     my $DetailsLink = $self->GetDetailsLink($Row);
-    print "<a id='job$EscapedKey' href='$DetailsLink'>";
+    print "<a id='job", $Job->Id, "' href='", $self->escapeHTML($DetailsLink),
+          "'>";
 
     my %HTMLChunks = ("queued" => "<span class='queued'>queued</span>",
                       "running" => "<span class='running'>running</span>",
-- 
2.30.2




More information about the wine-devel mailing list