X-Git-Url: https://git.ladys.computer/Gitweb/blobdiff_plain/82fe7d0b840b89b0ae5c3351e928daef0ec9ef630542cd026040b3333adcf03f..fcd046648df5126917fdf5fec3b324fe8913296a5912ee6b76954fb3f3d127eb:/gitweb.perl diff --git a/gitweb.perl b/gitweb.perl index 40730e1..a17455b 100755 --- a/gitweb.perl +++ b/gitweb.perl @@ -2091,7 +2091,7 @@ sub format_ref_marker { -href => href( action=>$dest_action, hash=>$dest - )}, $name); + )}, esc_html($name)); $markers .= " " . $link . ""; @@ -3936,6 +3936,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");