From 08a70c0ec8737fa1eef21f338aea5d527de6e779 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Fri, 25 May 2018 20:23:51 +0000 Subject: Do not write duplicate id= attributes, they violate HTML syntax. Append suffixes for disambiguation. Issue first reported by Jakub Klinkovsky (Arch Linux). --- man_html.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'man_html.c') diff --git a/man_html.c b/man_html.c index 40ac0fa1..fc4bc692 100644 --- a/man_html.c +++ b/man_html.c @@ -428,11 +428,10 @@ man_SH_pre(MAN_ARGS) char *id; if (n->type == ROFFT_HEAD) { - id = html_make_id(n); + id = html_make_id(n, 1); print_otag(h, TAG_H1, "cTi", "Sh", id); if (id != NULL) print_otag(h, TAG_A, "chR", "permalink", id); - free(id); } return 1; } @@ -498,11 +497,10 @@ man_SS_pre(MAN_ARGS) char *id; if (n->type == ROFFT_HEAD) { - id = html_make_id(n); + id = html_make_id(n, 1); print_otag(h, TAG_H2, "cTi", "Ss", id); if (id != NULL) print_otag(h, TAG_A, "chR", "permalink", id); - free(id); } return 1; } -- cgit