From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-2.4 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00, RP_MATCHES_RCVD shortcircuit=no autolearn=unavailable version=3.3.2 X-Original-To: meta@public-inbox.org Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 3AB5C1F42D; Mon, 15 Sep 2014 21:01:48 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Cc: Eric Wong Subject: [PATCH 1/3] hval: fixup bad line endings in HTML output Date: Mon, 15 Sep 2014 21:01:36 +0000 Message-Id: <1410814898-8628-1-git-send-email-e@80x24.org> X-Mailer: git-send-email 2.1.0.243.g30d45f7 List-Id: We should do this in filter, too, but sometimes we prefer to avoid filtering the message at all. --- lib/PublicInbox/Hval.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/PublicInbox/Hval.pm b/lib/PublicInbox/Hval.pm index 9be163a..68f8954 100644 --- a/lib/PublicInbox/Hval.pm +++ b/lib/PublicInbox/Hval.pm @@ -55,6 +55,7 @@ my %xhtml_map = ( sub ascii_html { my ($s) = @_; + $s =~ s/\r\n/\n/sg; # fixup bad line endings $s =~ s/([<>&'"])/$xhtml_map{$1}/ge; $enc_ascii->encode($s, Encode::HTMLCREF); } -- EW