Diff options
Diffstat (limited to 'source/ui-commit.c')
| -rw-r--r-- | source/ui-commit.c | 19 |
1 file changed, 5 insertions, 14 deletions
diff --git a/source/ui-commit.c b/source/ui-commit.c index 4882f3a..8e88faf 100644 --- a/source/ui-commit.c +++ b/source/ui-commit.c @@ -30,13 +30,7 @@ static void print_ident_row(const char *role, const char *name, const char *emai timestamp_t date, int tz) { htmlf("<tr><th scope='row'>%s</th><td>", role); - cgit_open_filter(ctx.repo->email_filter, email ? email : "", "commit"); - html_txt(name); - if (ctx.cfg.enable_plain_email) { - html(" "); - html_txt(email); - } - cgit_close_filter(ctx.repo->email_filter); + cgit_print_person(name, email, "commit", 1); html("</td><td class='right'><time datetime='"); html_attr(show_date(date, tz, cgit_date_mode(DATE_ISO8601_STRICT))); html("'>"); @@ -104,6 +98,7 @@ static void print_trailer_value(const char *key, const char *value) struct string_list *map; struct strbuf email = STRBUF_INIT; const char *name, *mail, *rest; + char *who; size_t name_len, mail_len; if (!split_ident_line(&ident, value, strlen(value)) && @@ -118,13 +113,9 @@ static void print_trailer_value(const char *key, const char *value) strbuf_addch(&email, '<'); strbuf_add(&email, mail, mail_len); strbuf_addch(&email, '>'); - cgit_open_filter(ctx.repo->email_filter, email.buf, "commit"); - html_ntxt(name, name_len); - if (ctx.cfg.enable_plain_email) { - html(" "); - html_txt(email.buf); - } - cgit_close_filter(ctx.repo->email_filter); + who = xmemdupz(name, name_len); + cgit_print_person(who, email.buf, "commit", 1); + free(who); strbuf_release(&email); rest = ident.mail_end + 1; while (isspace((unsigned char)*rest)) |
