From 2550582bfa95c8c610f5bdea5a2b2482d27005aa Mon Sep 17 00:00:00 2001
From: Eric Wong <e@80x24.org>
Date: Tue, 21 Jun 2016 10:35:37 +0000
Subject: [PATCH] view: support non-existent Subjects for permalink titles

Showing "(no subject)" seems like a common fallback for
messages without a Subject header.
---
 lib/PublicInbox/View.pm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm
index b6fa2a3d..8e81391e 100644
--- a/lib/PublicInbox/View.pm
+++ b/lib/PublicInbox/View.pm
@@ -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";
-- 
2.51.0