Commit 2dcb5e1
gitweb: Fix handling of non-ASCII characters in inserted HTML files
Use new insert_file() subroutine to insert HTML chunks from external
files: $site_header, $home_text (by default indextext.html),
$site_footer, and $projectroot/$project/REAME.html.
All non-ASCII chars of those files will be broken by Perl IO layer
without decoding to utf8, so insert_file() does to_utf8() on each
printed line; alternate solution would be to open those files with
"binmode $fh, ':utf8'", or even all files with "use open qw(:std :utf8)".
Note that inserting README.html lost one of checks for simplicity.
Noticed-by: Tatsuki Sugiura <sugi@nemui.org>
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent 3273ebc commit 2dcb5e1
1 file changed
+16
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2740 | 2740 | | |
2741 | 2741 | | |
2742 | 2742 | | |
| 2743 | + | |
| 2744 | + | |
| 2745 | + | |
| 2746 | + | |
| 2747 | + | |
| 2748 | + | |
| 2749 | + | |
| 2750 | + | |
| 2751 | + | |
2743 | 2752 | | |
2744 | 2753 | | |
2745 | 2754 | | |
| |||
2928 | 2937 | | |
2929 | 2938 | | |
2930 | 2939 | | |
2931 | | - | |
2932 | | - | |
2933 | | - | |
| 2940 | + | |
2934 | 2941 | | |
2935 | 2942 | | |
2936 | 2943 | | |
| |||
3017 | 3024 | | |
3018 | 3025 | | |
3019 | 3026 | | |
3020 | | - | |
3021 | | - | |
3022 | | - | |
| 3027 | + | |
3023 | 3028 | | |
3024 | 3029 | | |
3025 | 3030 | | |
| |||
4358 | 4363 | | |
4359 | 4364 | | |
4360 | 4365 | | |
4361 | | - | |
4362 | | - | |
4363 | | - | |
| 4366 | + | |
4364 | 4367 | | |
4365 | 4368 | | |
4366 | 4369 | | |
| |||
4472 | 4475 | | |
4473 | 4476 | | |
4474 | 4477 | | |
4475 | | - | |
4476 | | - | |
4477 | | - | |
4478 | | - | |
4479 | | - | |
4480 | | - | |
4481 | | - | |
| 4478 | + | |
| 4479 | + | |
| 4480 | + | |
| 4481 | + | |
4482 | 4482 | | |
4483 | 4483 | | |
4484 | 4484 | | |
| |||
0 commit comments