From: Paul Gortmaker <paul.gortmaker@windriver.com>
To: git@vger.kernel.org
Subject: [PATCH] gitweb: filter escapes from longer commit titles that break firefox
Date: Fri, 17 Apr 2009 12:24:33 -0400 [thread overview]
Message-ID: <1239985473-666-1-git-send-email-paul.gortmaker@windriver.com> (raw)
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
next reply other threads:[~2009-04-17 16:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-17 16:24 Paul Gortmaker [this message]
2009-04-20 9:32 ` [PATCH] gitweb: filter escapes from longer commit titles that break firefox 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1239985473-666-1-git-send-email-paul.gortmaker@windriver.com \
--to=paul.gortmaker@windriver.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.