diff options
author | Eric Wong <e@80x24.org> | 2019-01-27 11:43:56 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2019-01-28 06:14:53 +0000 |
commit | 6025d9881c00a0d4b538f06ce157eed416045e10 (patch) | |
tree | 355b8321a8fb1811f6667fcc7b4ed70372ac3e92 /lib/PublicInbox/ViewVCS.pm | |
parent | 603d9ebc517fcf89ab6d2e7845b118aa6b8e9069 (diff) | |
download | public-inbox-6025d9881c00a0d4b538f06ce157eed416045e10.tar.gz |
We need to post-process "highlight" output to ensure it doesn't contain odd bytes which cause "wide character" warnings or require odd glyphs in source form.
Diffstat (limited to 'lib/PublicInbox/ViewVCS.pm')
-rw-r--r-- | lib/PublicInbox/ViewVCS.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/PublicInbox/ViewVCS.pm b/lib/PublicInbox/ViewVCS.pm index a8aa0b61..63e503d8 100644 --- a/lib/PublicInbox/ViewVCS.pm +++ b/lib/PublicInbox/ViewVCS.pm @@ -20,7 +20,7 @@ use Encode qw(find_encoding); use PublicInbox::SolverGit; use PublicInbox::WwwStream; use PublicInbox::Linkify; -use PublicInbox::Hval qw(ascii_html to_filename); +use PublicInbox::Hval qw(ascii_html to_filename src_escape); my $hl = eval { require PublicInbox::HlMod; PublicInbox::HlMod->new; @@ -96,6 +96,8 @@ sub solve_result { $l->linkify_1($$blob); my $ok = $hl->do_hl($blob, $path) if $hl; if ($ok) { + $$ok = $enc_utf8->decode($$ok); + src_escape($$ok); $blob = $ok; } else { $$blob = ascii_html($$blob); |