unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
From: Eric Wong <e@80x24.org>
To: meta@public-inbox.org
Cc: Eric Wong <e@80x24.org>
Subject: [PATCH 1/3] hval: fixup bad line endings in HTML output
Date: Mon, 15 Sep 2014 21:01:36 +0000	[thread overview]
Message-ID: <1410814898-8628-1-git-send-email-e@80x24.org> (raw)

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


             reply	other threads:[~2014-09-15 21:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-15 21:01 Eric Wong [this message]
2014-09-15 21:01 ` [PATCH 2/3] index: drop signatures from nested output Eric Wong
2014-09-15 21:01 ` [PATCH 3/3] filter: ensure CRs do not show up in lynx conversions Eric Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://public-inbox.org/README

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1410814898-8628-1-git-send-email-e@80x24.org \
    --to=e@80x24.org \
    --cc=meta@public-inbox.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).