List for cgit developers and users
 help / color / mirror / Atom feed
From: john at keeping.me.uk (John Keeping)
Subject: Atom feed of package repo have non-escaped href
Date: Wed, 4 Jan 2017 09:21:14 +0000	[thread overview]
Message-ID: <20170104092114.GC1783@john.keeping.me.uk> (raw)
In-Reply-To: <CAKJAW0aaK+T9+Pp__B7UgZaQvbi6WNthS5uMXWEodu0QD1U3dg@mail.gmail.com>

On Tue, Jan 03, 2017 at 10:00:20PM -0800, Nodiv Byzero wrote:
> I'm investigating issue in Arch Aurweb
> https://bugs.archlinux.org/task/51968?project=2
> 
> where feed is broken, because href contains an & not "&amp;"
> Check this out: https://aur.archlinux.org/cgit/aur.git/atom/?h=pacaur
> 
> Could you confirm what is cgit issue?

Yes, it looks like this has been broken since atom support was added to
CGit.  Can you try the patch below and see if it fixes the issue?

-- >8 --
diff --git a/ui-atom.c b/ui-atom.c
index 7c17d6a..443cc98 100644
--- a/ui-atom.c
+++ b/ui-atom.c
@@ -52,7 +52,7 @@ static void add_entry(struct commit *commit, const char *host)
 		html_attr(pageurl);
 		if (ctx.cfg.virtual_root)
 			delim = '?';
-		htmlf("%cid=%s", delim, hex);
+		html_attrf("%cid=%s", delim, hex);
 		html("'/>\n");
 		free(pageurl);
 	}


      reply	other threads:[~2017-01-04  9:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-04  6:00 nodivbyzero
2017-01-04  9:21 ` john [this message]

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170104092114.GC1783@john.keeping.me.uk \
    --to=cgit@lists.zx2c4.com \
    /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.
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 NNTP newsgroup(s).