about summary refs log tree commit homepage
path: root/lib/PublicInbox/View.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-01-26 20:05:56 +0000
committerEric Wong <e@80x24.org>2019-01-26 23:05:46 +0000
commita817e10a4f94270d064fee0f18328efb910d9c35 (patch)
tree418d76f1e2fb3bd46de0e3a276e3e255f3110154 /lib/PublicInbox/View.pm
parentb8655db863d42a023a32c4604e10ee2acb619aa9 (diff)
downloadpublic-inbox-a817e10a4f94270d064fee0f18328efb910d9c35.tar.gz
It makes no difference to browsers aside from saving a few
bytes; and this means we won't have to worry about extra
'%0D' showing up in links to solver.
Diffstat (limited to 'lib/PublicInbox/View.pm')
-rw-r--r--lib/PublicInbox/View.pm4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm
index 41a45b0b..5aaa72ba 100644
--- a/lib/PublicInbox/View.pm
+++ b/lib/PublicInbox/View.pm
@@ -557,6 +557,10 @@ sub add_text_body {
 
         return attach_link($upfx, $ct, $p, $fn) unless defined $s;
 
+        # makes no difference to browsers, and don't screw up filename
+        # link generation in diffs with the extra '%0D'
+        $s =~ s/\r\n/\n/sg;
+
         my ($diff, $spfx);
         if ($s =~ /^(?:diff|---|\+{3}) /ms) {
                 $diff = [];