Atom feed of package repo have non-escaped href

John Keeping john at keeping.me.uk
Wed Jan 4 10:21:14 CET 2017


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 "&"
> 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);
 	}


More information about the CGit mailing list