]> Lady’s Gitweb - Gitweb/commit
gitweb: Better chopping in commit search results
authorJunio C Hamano <redacted>
Fri, 22 Feb 2008 16:33:47 +0000 (17:33 +0100)
committerLady <redacted>
Mon, 6 Apr 2026 04:07:12 +0000 (00:07 -0400)
commitd152df4cbbcc62def4367c4ba74af40a98e662dd6bb0503768198e247d692f50
tree58b2547853a0fbc1846ed697443d629a240516325301e03568e8509631400859
parent56b1a1c30ebc43edb4221ed1a8f8213f9807adf9d03338bfa004cd8ba9bf310e
gitweb: Better chopping in commit search results

When searching commit messages (commit search), if matched string is
too long, the generated HTML was munged leading to an ill-formed XHTML
document.

Now gitweb chop leading, trailing and matched parts, HTML escapes
those parts, then composes and marks up match info.  HTML output is
never chopped.  Limiting matched info to 80 columns (with slop) is now
done by dividing remaining characters after chopping match equally to
leading and trailing part, not by chopping composed and HTML marked
output.

Noticed-by: Jean-Baptiste Quenot <redacted>
Signed-off-by: Junio C Hamano <redacted>
Signed-off-by: Jakub Narebski <redacted>
Signed-off-by: Junio C Hamano <redacted>
gitweb.perl
This page took 0.118329 seconds and 4 git commands to generate.