diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2018-05-25 20:23:51 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2018-05-25 20:23:51 +0000 |
commit | 08a70c0ec8737fa1eef21f338aea5d527de6e779 (patch) | |
tree | 5595ac694a287e63e09d4a508df2a22aded8fc2d /man_html.c | |
parent | 1f3a93e77917534228a285ef0cb54e575870b4dd (diff) | |
download | mandoc-08a70c0ec8737fa1eef21f338aea5d527de6e779.tar.gz |
Do not write duplicate id= attributes, they violate HTML syntax.
Append suffixes for disambiguation. Issue first reported by Jakub
Klinkovsky <j dot l dot k at gmx dot com> (Arch Linux).
Diffstat (limited to 'man_html.c')
-rw-r--r-- | man_html.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -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; } |