Francois Gouget : testbot/web: Tweak the main page's job details links.

Alexandre Julliard julliard at winehq.org
Thu Apr 21 15:12:07 CDT 2022


Module: tools
Branch: master
Commit: de715c7e3ea1adcc6065325abe0e5a5d14aec0c1
URL:    https://source.winehq.org/git/tools.git/?a=commit;h=de715c7e3ea1adcc6065325abe0e5a5d14aec0c1

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Thu Apr 21 15:59:03 2022 +0200

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

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>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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 0b8a9cb..1c506c9 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>",




More information about the wine-cvs mailing list