unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
* [PATCH 1/3] hval: fixup bad line endings in HTML output
@ 2014-09-15 21:01 Eric Wong
  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
  0 siblings, 2 replies; 3+ messages in thread
From: Eric Wong @ 2014-09-15 21:01 UTC (permalink / raw)
  To: meta; +Cc: Eric Wong

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-09-15 21:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-15 21:01 [PATCH 1/3] hval: fixup bad line endings in HTML output Eric Wong
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

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).