]> Lady’s Gitweb - Gitweb/commit
gitweb: Simplify (and fix) chop_str
authorJohn 'Warthog9' Hawley <redacted>
Wed, 3 Feb 2010 11:28:28 +0000 (12:28 +0100)
committerLady <redacted>
Mon, 6 Apr 2026 04:50:39 +0000 (00:50 -0400)
commit5656c6049256fdc2782ea42c603df638297856e690f1a3246ec07e8c8997bb77
tree3a9f55aa11ff5dd8031b1f430f3b9ea6f36dd044234445b1ecf35708a6afdebe
parent0a1276bd4b16b1fdf71b6b852fc9ba6c094d67edbec5ca8f06c9170b6445284d
gitweb: Simplify (and fix) chop_str

The chop_str subroutine is meant to be used on strings (such as commit
description / title) *before* HTML escaping, which means before
applying esc_html or equivalent.

Therefore get rid of the failed attempt to always remove full HTML
entities (like e.g. &amp; or &nbsp;).  It is not necessary (HTML
entities gets added later), and it can cause chop_str to chop a string
incorrectly.

Specifically:

     API & protocol: support option to force written data immediately to disk

from http://git.kernel.org/?p=daemon/distsrv/chunkd.git;a=commit;h=3b02f749df2cb1288f345a689d85e7061f507e54

The short version of the title gets chopped to

     API ...

where it should be

     API & protocol: support option to force written data...

Noticed-by: John 'Warthog9' Hawley <redacted>
Signed-off-by: John 'Warthog9' Hawley <redacted>
Signed-off-by: Jakub Narebski <redacted>
Signed-off-by: Junio C Hamano <redacted>
gitweb.perl
This page took 0.313628 seconds and 4 git commands to generate.