mirror of
https://github.com/git/git
synced 2024-08-27 19:49:21 +00:00
Merge branch 'sk/gitweb-highlight-encoding'
Some multi-byte encoding can have a backslash byte as a later part of one letter, which would confuse "highlight" filter used in gitweb. * sk/gitweb-highlight-encoding: gitweb: apply fallback encoding before highlight
This commit is contained in:
commit
04bd6da2dc
|
@ -3935,6 +3935,9 @@ sub run_highlighter {
|
|||
|
||||
close $fd;
|
||||
open $fd, quote_command(git_cmd(), "cat-file", "blob", $hash)." | ".
|
||||
quote_command($^X, '-CO', '-MEncode=decode,FB_DEFAULT', '-pse',
|
||||
'$_ = decode($fe, $_, FB_DEFAULT) if !utf8::decode($_);',
|
||||
'--', "-fe=$fallback_encoding")." | ".
|
||||
quote_command($highlight_bin).
|
||||
" --replace-tabs=8 --fragment --syntax $syntax |"
|
||||
or die_error(500, "Couldn't open file or run syntax highlighter");
|
||||
|
|
Loading…
Reference in a new issue