* [PATCH 1/3] hval: fixup bad line endings in HTML output
@ 2014-09-15 21:01 7% Eric Wong
0 siblings, 0 replies; 1+ results
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 [relevance 7%]
Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2014-09-15 21:01 7% [PATCH 1/3] hval: fixup bad line endings in HTML output Eric Wong
Code repositories for project(s) associated with this public inbox
https://80x24.org/public-inbox.git
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).