about summary refs log tree commit homepage
diff options
context:
space:
mode:
-rw-r--r--lib/PublicInbox/Hval.pm3
-rw-r--r--t/hl_mod.t3
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/PublicInbox/Hval.pm b/lib/PublicInbox/Hval.pm
index c134e297..4a79439f 100644
--- a/lib/PublicInbox/Hval.pm
+++ b/lib/PublicInbox/Hval.pm
@@ -58,8 +58,11 @@ my %xhtml_map = (
 $xhtml_map{chr($_)} = sprintf('\\x%02x', $_) for (0..31);
 %xhtml_map = (%xhtml_map, %escape_sequence);
 
+# for post-processing the output of highlight.pm and perhaps other
+# highlighers in the future
 sub src_escape ($) {
         $_[0] =~ s/\r\n/\n/sg;
+        $_[0] =~ s/'/'/sg; # workaround https://bugs.debian.org/927409
         $_[0] =~ s/([\x7f\x00-\x1f])/$xhtml_map{$1}/sge;
         $_[0] = $enc_ascii->encode($_[0], Encode::HTMLCREF);
 }
diff --git a/t/hl_mod.t b/t/hl_mod.t
index fc7b712c..52ef39dc 100644
--- a/t/hl_mod.t
+++ b/t/hl_mod.t
@@ -31,9 +31,6 @@ my $orig = $str;
                 my $cmd = [ qw(w3m -T text/html -dump -config /dev/null) ];
                 my ($out, $err) = ('', '');
 
-                # workaround https://bugs.debian.org/927409
-                $$ref =~ s/'/'/sg;
-
                 IPC::Run::run($cmd, \('<pre>'.$$ref.'</pre>'), \$out, \$err);
                 # expand tabs and normalize whitespace,
                 # w3m doesn't preserve tabs