]> Sergey Matveev's repositories - public-inbox.git/commitdiff
view: escape Message-ID for "next" link
authorEric Wong <e@80x24.org>
Tue, 17 May 2016 05:39:06 +0000 (05:39 +0000)
committerEric Wong <e@80x24.org>
Tue, 17 May 2016 05:39:14 +0000 (05:39 +0000)
Oops, we need to escape Message-IDs since they can contain
bad characters such as '%' in them.  '@' actually seems fine
and does not need to be escaped; however, but we've been
doing it forever.

lib/PublicInbox/View.pm

index d559cae4b9cbe34239f5c930dcf3abcca5929119..3fa7cfc23d11d032b3e77d1b57950e4e1f56e8f5 100644 (file)
@@ -518,7 +518,8 @@ sub html_footer {
                        $irt = ' ' x length('parent ');
                }
                if ($next) {
-                       $irt .= "<a\nhref=\"$upfx$next/\"\nrel=next>next</a> ";
+                       my $n = PublicInbox::Hval->new_msgid($next)->as_href;
+                       $irt .= "<a\nhref=\"$upfx$n/\"\nrel=next>next</a> ";
                } else {
                        $irt .= ' ' x length('next ');
                }