2
0
mirror of https://git.zx2c4.com/cgit/ synced 2024-11-13 19:12:05 +00:00

ui-atom: properly escape delimiter in page link

If the delimiter here is '&' then it needs to be escaped for inclusion
in an attribute.  Use html_attrf() to ensure that this happens (we know
that hex won't need escaping, but this makes it clearer what's
happening.

Signed-off-by: John Keeping <john@keeping.me.uk>
This commit is contained in:
John Keeping 2017-01-15 12:29:38 +00:00 committed by Lukas Fleischer
parent d08d6fcb19
commit 7f7f91141c

View File

@ -63,7 +63,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);
}