Unified · Split
| @@ -746,16 +746,19 @@ void cgit_print_docstart(void) · 745 unmodified lines | ||
| 746 | 746 | html("'/>\n"); |
| 747 | 747 | } |
| 748 | 748 | if (host && ctx.repo && ctx.qry.head) { |
| 749 | + char *fileurl; | |
| 749 | 750 | struct strbuf sb = STRBUF_INIT; |
| 750 | 751 | strbuf_addf(&sb, "h=%s", ctx.qry.head); |
| 751 | 752 | |
| 752 | 753 | html("<link rel='alternate' title='Atom feed' href='"); |
| 753 | 754 | html(cgit_httpscheme()); |
| 754 | 755 | html_attr(cgit_hosturl()); |
| 755 | − html_attr(cgit_fileurl(ctx.repo->url, "atom", ctx.qry.vpath, | |
| 756 | − sb.buf)); | |
| 756 | + fileurl = cgit_fileurl(ctx.repo->url, "atom", ctx.qry.vpath, | |
| 757 | + sb.buf); | |
| 758 | + html_attr(fileurl); | |
| 757 | 759 | html("' type='application/atom+xml'/>\n"); |
| 758 | 760 | strbuf_release(&sb); |
| 761 | + free(fileurl); | |
| 759 | 762 | } |
| 760 | 763 | if (ctx.repo) |
| 761 | 764 | cgit_add_clone_urls(print_rel_vcs_link); |
| @@ -997,9 +1000,12 @@ void cgit_print_pageheader(void) · 235 unmodified lines | ||
| 997 | 1000 | ctx.qry.head, ctx.qry.vpath); |
| 998 | 1001 | html("</td><td class='form'>"); |
| 999 | 1002 | html("<form class='right' method='get' action='"); |
| 1000 | − if (ctx.cfg.virtual_root) | |
| 1001 | − html_url_path(cgit_fileurl(ctx.qry.repo, "log", | |
| 1002 | − ctx.qry.vpath, NULL)); | |
| 1003 | + if (ctx.cfg.virtual_root) { | |
| 1004 | + char *fileurl = cgit_fileurl(ctx.qry.repo, "log", | |
| 1005 | + ctx.qry.vpath, NULL); | |
| 1006 | + html_url_path(fileurl); | |
| 1007 | + free(fileurl); | |
| 1008 | + } | |
| 1003 | 1009 | html("'>\n"); |
| 1004 | 1010 | cgit_add_hidden_formfields(1, 0, "log"); |
| 1005 | 1011 | html("<select name='qt'>\n"); |