* [PATCH] view: escape Message-ID for "next" link
@ 2016-05-17 5:39 Eric Wong
0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2016-05-17 5:39 UTC (permalink / raw)
To: meta
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 | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm
index e5329bb..776b859 100644
--- a/lib/PublicInbox/View.pm
+++ b/lib/PublicInbox/View.pm
@@ -498,7 +498,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 ');
}
--
EW
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2016-05-17 5:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-17 5:39 [PATCH] view: escape Message-ID for "next" link Eric Wong
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).