]> Sergey Matveev's repositories - public-inbox.git/commitdiff
view: support non-existent Subjects for permalink titles
authorEric Wong <e@80x24.org>
Tue, 21 Jun 2016 10:35:37 +0000 (10:35 +0000)
committerEric Wong <e@80x24.org>
Tue, 21 Jun 2016 10:36:25 +0000 (10:36 +0000)
Showing "(no subject)" seems like a common fallback for
messages without a Subject header.

lib/PublicInbox/View.pm

index b6fa2a3d81886dd480978ea8efefd0bbfea0973a..8e81391e106e67584527b8fa17287f3cc16a3ecb 100644 (file)
@@ -353,6 +353,7 @@ sub _msg_html_prepare {
                $rv .= "$h: $v\n";
 
        }
+       $title[0] ||= '(no subject)';
        $ctx->{-title_html} = join(' - ', @title);
        $rv .= 'Message-ID: &lt;' . $mid->as_html . '&gt; ';
        $rv .= "(<a\nhref=\"raw\">raw</a>)\n";