From: Eric Wong <e@80x24.org>
To: meta@public-inbox.org
Subject: [PATCH] feed: favor relative URL to Atom feed in HTML
Date: Sat, 13 Feb 2016 22:50:29 +0000 [thread overview]
Message-ID: <20160213225029.16219-1-e@80x24.org> (raw)
Normal browsers should understand relative path names.
Atom feeds may be hosted externally and seems to need
full URLs.
---
lib/PublicInbox/Feed.pm | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/lib/PublicInbox/Feed.pm b/lib/PublicInbox/Feed.pm
index bbc89f2..a0aa62a 100644
--- a/lib/PublicInbox/Feed.pm
+++ b/lib/PublicInbox/Feed.pm
@@ -121,12 +121,11 @@ sub emit_html_index {
my $title = $feed_opts->{description} || '';
$title = PublicInbox::Hval->new_oneline($title)->as_html;
- my $atom_url = $feed_opts->{atomurl};
my ($footer, $param, $last);
my $state = { ctx => $ctx, seen => {}, anchor_idx => 0 };
my $srch = $ctx->{srch};
- my $top = "<b>$title</b> (<a\nhref=\"$atom_url\">Atom feed</a>)";
+ my $top = "<b>$title</b> (<a\nhref=\"new.atom\">Atom feed</a>)";
if ($srch) {
$top = qq{<form\naction=""><pre>$top} .
@@ -139,7 +138,7 @@ sub emit_html_index {
$fh->write("<html><head><title>$title</title>" .
"<link\nrel=alternate\ntitle=\"Atom feed\"\n".
- "href=\"$atom_url\"\ntype=\"application/atom+xml\"/>" .
+ "href=\"new.atom\"\ntype=\"application/atom+xml\"/>" .
PublicInbox::Hval::STYLE .
"</head><body>$top");
--
EW
reply other threads:[~2016-02-13 22:50 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://public-inbox.org/README
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160213225029.16219-1-e@80x24.org \
--to=e@80x24.org \
--cc=meta@public-inbox.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/public-inbox.git
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).