author | Junio C Hamano <gitster@pobox.com> | |
Fri, 22 Feb 2008 16:33:47 +0000 (17:33 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 22 Feb 2008 18:06:58 +0000 (10:06 -0800) | ||
commit | be8b9063810f0c47f825c47045c7ca137f520edb | |
tree | 61f304cdc179a4987822875d1ffb91ca90f84675 | tree | snapshot |
parent | fd74cb0874126876227a958f6250323a4a4478a5 | commit | diff |
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 <jbq@caraldi.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
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 <jbq@caraldi.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
gitweb/gitweb.perl | diff | blob | history |