git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] gitweb: Call to_utf8() on input string in chop_and_escape_str()
@ 2011-11-29 21:41 Jürgen Kreileder
  2011-11-29 21:50 ` Jakub Narebski
  0 siblings, 1 reply; 3+ messages in thread
From: Jürgen Kreileder @ 2011-11-29 21:41 UTC (permalink / raw)
  To: Jakub Narebski; +Cc: git

a) To fix the comparison with the chopped string
b) To give the title attribute correct encoding

Signed-off-by: Jürgen Kreileder <jk@blackdown.de>
---
 gitweb/gitweb.perl |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 4f0c3bd..4237ea6 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -1695,11 +1695,11 @@ sub chop_and_escape_str {
 	my ($str) = @_;

 	my $chopped = chop_str(@_);
-	if ($chopped eq $str) {
+	if ($chopped eq to_utf8($str)) {
 		return esc_html($chopped);
 	} else {
 		$str =~ s/[[:cntrl:]]/?/g;
-		return $cgi->span({-title=>$str}, esc_html($chopped));
+		return $cgi->span({-title => to_utf8($str)}, esc_html($chopped));
 	}
 }

-- 
1.7.5.4

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

end of thread, other threads:[~2011-11-29 22:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-29 21:41 [PATCH] gitweb: Call to_utf8() on input string in chop_and_escape_str() Jürgen Kreileder
2011-11-29 21:50 ` Jakub Narebski
2011-11-29 22:14   ` Jürgen Kreileder

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).