X-Git-Url: https://git.ladys.computer/Gitweb/blobdiff_plain/8a559bfb633a7d962ae58871f6444640ff59e0198fe04deaa0e95707b61b6939..3ca8b9c2c0dc5fa4427d6d1c8a41590cdc2bd1097c0e6e5975b2332aafe5ca97:/gitweb.perl diff --git a/gitweb.perl b/gitweb.perl index 349a7d2..e8f277c 100755 --- a/gitweb.perl +++ b/gitweb.perl @@ -1739,12 +1739,15 @@ sub esc_html_hl_regions { my $pos = 0; for my $s (@sel) { - $out .= esc_html(substr($str, $pos, $s->[0] - $pos)) - if ($s->[0] - $pos > 0); - $out .= $cgi->span({-class => $css_class}, - esc_html(substr($str, $s->[0], $s->[1] - $s->[0]))); + my ($begin, $end) = @$s; - $pos = $s->[1]; + my $escaped = esc_html(substr($str, $begin, $end - $begin)); + + $out .= esc_html(substr($str, $pos, $begin - $pos)) + if ($begin - $pos > 0); + $out .= $cgi->span({-class => $css_class}, $escaped); + + $pos = $end; } $out .= esc_html(substr($str, $pos)) if ($pos < length($str)); @@ -3887,6 +3890,7 @@ sub print_feed_meta { '-type' => "application/$type+xml" ); + $href_params{'extra_options'} = undef; $href_params{'action'} = $type; $link_attr{'-href'} = href(%href_params); print "header( -type => $known_snapshot_formats{$format}{'type'}, -content_disposition => 'inline; filename="' . $filename . '"', + %co ? (-last_modified => $latest_date{'rfc2822'}) : (), -status => '200 OK'); open my $fd, "-|", $cmd