From: john at keeping.me.uk (John Keeping)
Subject: [PATCH 1/2] ui-repolist: provide hyperlinks on section names
Date: Tue, 13 Sep 2016 00:08:23 +0100 [thread overview]
Message-ID: <20160912230739.GB29199@john.keeping.me.uk> (raw)
In-Reply-To: <1473717710-31710-2-git-send-email-andy.doan@linaro.org>
On Mon, Sep 12, 2016 at 05:01:49PM -0500, Andy Doan wrote:
> This makes it easier to traverse into a section of git repositories.
>
> Signed-off-by: Andy Doan <andy.doan at linaro.org>
> ---
> ui-repolist.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/ui-repolist.c b/ui-repolist.c
> index 30915df..f6b6b47 100644
> --- a/ui-repolist.c
> +++ b/ui-repolist.c
> @@ -322,7 +322,7 @@ void cgit_print_repolist(void)
> strcmp(section, last_section)))) {
> htmlf("<tr class='nohover'><td colspan='%d' class='reposection'>",
> columns);
> - html_txt(section);
> + htmlf("<a href='%s'>%s</a>", section, section);
I probably should have spotted this before, but "section" isn't being
properly escaped after this patch. This needs to be:
html("<a href='");
html_attr(section);
html("'>");
html_txt(section);
html("</a>");
(although the first and last strings could be combined with the
surrounding statements).
> html("</td></tr>");
> last_section = section;
> }
> --
> 2.7.4
next prev parent reply other threads:[~2016-09-12 23:08 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-12 22:01 [PATCHv2 0/2] Collapsible Section Support andy.doan
2016-09-12 22:01 ` [PATCH 1/2] ui-repolist: provide hyperlinks on section names andy.doan
2016-09-12 23:08 ` john [this message]
2016-09-12 22:01 ` [PATCH 2/2] ui-repolist: Allow sections to be collapsible andy.doan
2016-09-13 3:54 ` [PATCHv3 0/2] Collapsible Section Support andy.doan
2016-09-13 3:54 ` [PATCHv3 1/2] ui-repolist: provide hyperlinks on section names andy.doan
2016-09-13 3:54 ` [PATCHv3 2/2] ui-repolist: Allow sections to be collapsible andy.doan
2016-10-01 20:50 ` [PATCHv2 0/2] Collapsible Section Support Jason
2016-10-03 15:44 ` andy.doan
2016-10-03 15:54 ` Jason
2016-10-03 15:56 ` Jason
2016-10-03 18:04 ` andy.doan
2016-10-03 20:52 ` andy.doan
2016-10-11 16:15 ` andy.doan
2016-10-03 18:10 ` tim
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=20160912230739.GB29199@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).