blob: 2dbf661fc9eee86a001012d404dd1ace8438b615 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
From 6d3c8bc37f6124c2193d66587079975d381aa435 Mon Sep 17 00:00:00 2001
From: John Keeping <john@keeping.me.uk>
Date: Sun, 15 Jan 2017 12:29:38 +0000
Subject: [PATCH 11/15] 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>
---
ui-atom.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ui-atom.c b/ui-atom.c
index 41838d3..3866823 100644
--- a/ui-atom.c
+++ b/ui-atom.c
@@ -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);
}
--
2.14.1
|