@@ -1185,6 +1185,15 @@ sub nullcols {
join ", ", map { m/::/ ? "NULL::$' as $`" : "NULL as $_" } @_;
}
+sub encode_with_wbrs ($) {
+ my ($s) = @_;
+ my $re = qr{[-/]};
+ join '', map {
+ my $b = s{^$re}{} ? ('<wbr>'. $& . '⁠') : '';
+ $b.encode_entities($_);
+ } split m{(?=$re)}, $s;
+}
+
sub htmloutjob ($$) {
my ($fi,$job) = @_;
return unless defined $htmldir;
@@ -1666,11 +1675,9 @@ END
print H "</th>\n";
foreach my $col (@cols) {
- my $th= $col;
- $th =~ s/\-/ $&/g;
print H "<th>";
print H "<a href=\"".encode_entities($col)."/$htmlleaf\">";
- print H encode_entities($th);
+ print H encode_with_wbrs($col);
print H "</a>";
print H "</th>";
}
@@ -1726,7 +1733,8 @@ END
next if $this[1] == $worst[1] && $ei->{Step}{status} ne 'pass';
@worst=@this;
push @worst,
- encode_entities("$ei->{Step}{stepno}. $ei->{Step}{testid}");
+ encode_entities("$ei->{Step}{stepno}. ").
+ encode_with_wbrs($ei->{Step}{testid});
}
push @worstrow1, "<td ",$worst[2],">",$worst[3],"</td>";
push @worstrow2, "<td ",$worst[2],">",$worst[0],"</td>";
Use <wbr>. Signed-off-by: Ian Jackson <iwj@xenproject.org> --- sg-report-flight | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-)