/* ui-commit.c: generate commit view
*
- * Copyright (C) 2006 Lars Hjemli
+ * Copyright (C) 2006-2014 cgit Development Team <cgit@lists.zx2c4.com>
*
* Licensed under GNU General Public License v2
* (see COPYING for full license text)
cgit_print_diff_ctrls();
html("<table summary='commit info' class='commit-info'>\n");
html("<tr><th>author</th><td>");
+ cgit_open_filter(ctx.repo->email_filter, info->author_email, "commit");
html_txt(info->author);
if (!ctx.cfg.noplainemail) {
html(" ");
html_txt(info->author_email);
}
+ cgit_close_filter(ctx.repo->email_filter);
html("</td><td class='right'>");
cgit_print_date(info->author_date, FMT_LONGDATE, ctx.cfg.local_time);
html("</td></tr>\n");
html("<tr><th>committer</th><td>");
+ cgit_open_filter(ctx.repo->email_filter, info->committer_email, "commit");
html_txt(info->committer);
if (!ctx.cfg.noplainemail) {
html(" ");
html_txt(info->committer_email);
}
+ cgit_close_filter(ctx.repo->email_filter);
html("</td><td class='right'>");
cgit_print_date(info->committer_date, FMT_LONGDATE, ctx.cfg.local_time);
html("</td></tr>\n");
}
html("</table>\n");
html("<div class='commit-subject'>");
- if (ctx.repo->commit_filter)
- cgit_open_filter(ctx.repo->commit_filter);
+ cgit_open_filter(ctx.repo->commit_filter);
html_txt(info->subject);
- if (ctx.repo->commit_filter)
- cgit_close_filter(ctx.repo->commit_filter);
+ cgit_close_filter(ctx.repo->commit_filter);
show_commit_decorations(commit);
html("</div>");
html("<div class='commit-msg'>");
- if (ctx.repo->commit_filter)
- cgit_open_filter(ctx.repo->commit_filter);
+ cgit_open_filter(ctx.repo->commit_filter);
html_txt(info->msg);
- if (ctx.repo->commit_filter)
- cgit_close_filter(ctx.repo->commit_filter);
+ cgit_close_filter(ctx.repo->commit_filter);
html("</div>");
if (notes.len != 0) {
html("<div class='notes-header'>Notes</div>");
html("<div class='notes'>");
- if (ctx.repo->commit_filter)
- cgit_open_filter(ctx.repo->commit_filter);
+ cgit_open_filter(ctx.repo->commit_filter);
html_txt(notes.buf);
- if (ctx.repo->commit_filter)
- cgit_close_filter(ctx.repo->commit_filter);
+ cgit_close_filter(ctx.repo->commit_filter);
html("</div>");
html("<div class='notes-footer'></div>");
}