[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [OSSTEST PATCH 10/14] Reporting: report_run_getinfo produces Content
Previously we produced Summary, and the call sites were confused about whether it had already been html-escaped. Now we produce something which is explicitly already html. No functional change except that some sg-report-host-history output is escaped as it ought to have been (but this is only relevant if the database contains strange things which none of ours do). Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx> --- Osstest/Executive.pm | 3 ++- sg-report-host-history | 2 +- sg-report-job-history | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Osstest/Executive.pm b/Osstest/Executive.pm index a45ec59..eb01fd1 100644 --- a/Osstest/Executive.pm +++ b/Osstest/Executive.pm @@ -32,6 +32,7 @@ use IO::Handle; use JSON; use File::Basename; use IO::Socket::INET; +use HTML::Entities; #use Data::Dumper; use Osstest; @@ -206,7 +207,7 @@ sub report_run_getinfo ($) { my $single = sub { my ($summary, $colour) = @_; return { - Summary => $summary, + Content => encode_entities($summary), ColourAttr => "bgcolor=\"$colour\"", }; }; diff --git a/sg-report-host-history b/sg-report-host-history index dc150af..f33fafa 100755 --- a/sg-report-host-history +++ b/sg-report-host-history @@ -248,7 +248,7 @@ END print H "<td><a href=\"$url\">$jr->{job}</td>\n"; my $ri = report_run_getinfo({ %$jr, %$ir }); - print H "<td $ri->{ColourAttr}>$ri->{Summary}</td>\n"; + print H "<td $ri->{ColourAttr}>$ri->{Content}</td>\n"; print H "</tr>\n\n"; $alternate ^= 1; diff --git a/sg-report-job-history b/sg-report-job-history index 3aec6a0..31b8d37 100755 --- a/sg-report-job-history +++ b/sg-report-job-history @@ -238,7 +238,7 @@ END print H "<td>".encode_entities($r->{Flight}{branch})."</td>\n"; $url= "$c{ReportHtmlPubBaseUrl}/$flt/".encode_entities($j)."/"; print H "<td $r->{ColourAttr}><a href=\"$url\">". - encode_entities($r->{Summary})."</a></td>\n"; + $r->{Content}."</a></td>\n"; my $lastrev; my $hosts = join ", ", map { $_ // "-" } @{ $r->{Hosts} }; print H "<td>".encode_entities($hosts)."</td>\n"; -- 1.7.10.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |