git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] gitweb: filter escapes from longer commit titles that break firefox
@ 2009-04-17 16:24 Paul Gortmaker
  2009-04-20  9:32 ` Jakub Narebski
  0 siblings, 1 reply; 7+ messages in thread
From: Paul Gortmaker @ 2009-04-17 16:24 UTC (permalink / raw)
  To: git

If there is a commit that ends in ^X and is longer in length than
what will fit in title_short, then it doesn't get fed through
esc_html() and so the ^X will appear as-is in the page source.

When Firefox comes across this, it will fail to display the page,
and only display a couple lines of error messages that read like:

   XML Parsing Error: not well-formed
   Location: http://git ....

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 gitweb/gitweb.perl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 33ef190..e686e82 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -2470,7 +2470,7 @@ sub parse_commit_text {
 	foreach my $title (@commit_lines) {
 		$title =~ s/^    //;
 		if ($title ne "") {
-			$co{'title'} = chop_str($title, 80, 5);
+			$co{'title'} = chop_and_escape_str($title, 80, 5);
 			# remove leading stuff of merges to make the interesting part visible
 			if (length($title) > 50) {
 				$title =~ s/^Automatic //;
-- 
1.6.2.3

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-04-25  9:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-17 16:24 [PATCH] gitweb: filter escapes from longer commit titles that break firefox Paul Gortmaker
2009-04-20  9:32 ` Jakub Narebski
2009-04-20 13:29   ` Paul Gortmaker
2009-04-24 17:53     ` Jakub Narebski
2009-04-24 19:48       ` Paul Gortmaker
2009-04-24 22:10         ` Jakub Narebski
2009-04-25  9:04           ` Jakub Narebski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).