Thread (7 messages) flat view 7 messages, 1 author, 2016-06-15
STALE3750d REVIEWED: 1 (0M)

Revision resend of 2 in this series; 1 review trailer.

Revisions (2)
  1. v1 [diff vs current]
  2. resend current

[PATCH 1/3] gitweb: Call to_utf8() on input string in chop_and_escape_str()

From: Jakub Narebski <hidden>
Date: 2016-06-15 22:52:39
Subsystem: the rest · Maintainer: Linus Torvalds

From: Jürgen Kreileder <redacted>

a) To fix the comparison with the chopped string,
   otherwise we compare bytes with characters, as
   chop_str() must run to_utf8() for correct operation
b) To give the title attribute correct encoding;
   we need to mark strings as UTF-8 before outpur

Signed-off-by: Jürgen Kreileder <redacted>
Acked-by: Jakub Narębski <redacted>
---
 gitweb/gitweb.perl |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index f80f259..35126cd 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -1696,6 +1696,7 @@ sub chop_and_escape_str {
 	my ($str) = @_;
 
 	my $chopped = chop_str(@_);
+	$str = to_utf8($str);
 	if ($chopped eq $str) {
 		return esc_html($chopped);
 	} else {
-- 
1.7.6
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help