Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
send-email: validate & reconfirm interactive responses
[gitweb.git]
/
gitweb
/
gitweb.perl
diff --git
a/gitweb/gitweb.perl
b/gitweb/gitweb.perl
index dc2ad9d4a4d9c56c78cb73a31492bf93be93141f..874023a33e9162b99bfa5b0e4038b102c129f6f1 100755
(executable)
--- a/
gitweb/gitweb.perl
+++ b/
gitweb/gitweb.perl
@@
-1442,8
+1442,8
@@
sub validate_refname {
sub to_utf8 {
my $str = shift;
return undef unless defined $str;
- if (utf8::valid($str)) {
- utf8::decode($str);
+
+ if (utf8::is_utf8($str) || utf8::decode($str)) {
return $str;
} else {
return decode($fallback_encoding, $str, Encode::FB_DEFAULT);