From: john at keeping.me.uk (John Keeping)
Subject: [PATCH 3/3] ui-repolist: HTML-escape cgit_rooturl() response
Date: Sun, 12 Jan 2014 19:45:17 +0000 [thread overview]
Message-ID: <a1bd71909a8aec1c4419d04d307f455742f0cd2c.1389555852.git.john@keeping.me.uk> (raw)
In-Reply-To: <432e1f40c0d887db602ec9411ae16c45896a54f5.1389555852.git.john@keeping.me.uk>
This is for consistency with other callers. The value returned from
cgit_rooturl is not guaranteed to be HTML-safe.
Signed-off-by: John Keeping <john at keeping.me.uk>
---
ui-repolist.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/ui-repolist.c b/ui-repolist.c
index d4ee279..e8d5eb6 100644
--- a/ui-repolist.c
+++ b/ui-repolist.c
@@ -106,7 +106,9 @@ static int is_in_url(struct cgit_repo *repo)
static void print_sort_header(const char *title, const char *sort)
{
- htmlf("<th class='left'><a href='%s?s=%s", cgit_rooturl(), sort);
+ html("<th class='left'><a href='");
+ html_attr(cgit_rooturl());
+ htmlf("?s=%s", sort);
if (ctx.qry.search) {
html("&q=");
html_url_arg(ctx.qry.search);
--
1.8.5.226.g0d60d77
next prev parent reply other threads:[~2014-01-12 19:45 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-12 19:45 [PATCH 1/3] ui-refs: escape HTML chars in author and tagger names john
2014-01-12 19:45 ` [PATCH 2/3] ui-shared: URL-escape script_name john
2014-01-12 21:18 ` Jason
2014-01-12 22:00 ` john
2014-01-12 19:45 ` john [this message]
2014-01-12 22:03 ` [PATCH 3/3] ui-repolist: HTML-escape cgit_rooturl() response Jason
2014-01-12 22:02 ` [PATCH 1/3] ui-refs: escape HTML chars in author and tagger names Jason
2014-01-12 22:17 ` john
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=a1bd71909a8aec1c4419d04d307f455742f0cd2c.1389555852.git.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).