From 047b448a3abc0c3811fc61dce3e9e97aa04bb8b4 Mon Sep 17 00:00:00 2001 From: Rene Kita Date: Wed, 28 Dec 2022 12:41:20 +0100 Subject: [PATCH] Recognize link targets in dfn elements This fixes https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1018696 --- html.c | 5 +++-- html.h | 2 ++ tagtable.tab | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/html.c b/html.c index 563f4e7..8f01231 100644 --- a/html.c +++ b/html.c @@ -6,6 +6,7 @@ /* Define HTML Tag Infomation Table */ #define ATTR_CORE ATTR_ID +unsigned char ALST_ID[] = { ATTR_CORE }; unsigned char ALST_A[] = { ATTR_NAME, ATTR_HREF, ATTR_REL, ATTR_CHARSET, ATTR_TARGET, ATTR_HSEQ, ATTR_REFERER, @@ -237,9 +238,9 @@ TagInfo TagMAP[MAX_HTMLTAG] = { {"/section", NULL, 0, TFLG_END}, /* 146 HTML_N_SECTION */ {"/dt", NULL, 0, TFLG_END}, /* 147 HTML_N_DT */ {"/dd", NULL, 0, TFLG_END}, /* 148 HTML_N_DD */ + {"dfn", ALST_ID, ARR_SZ(ALST_ID), 0}, /* 149 HTML_DFN */ + {"/dfn", NULL, 0, TFLG_END}, /* 150 HTML_N_DFN */ - {NULL, NULL, 0, 0}, /* 149 Undefined */ - {NULL, NULL, 0, 0}, /* 150 Undefined */ {NULL, NULL, 0, 0}, /* 151 Undefined */ {NULL, NULL, 0, 0}, /* 152 Undefined */ {NULL, NULL, 0, 0}, /* 153 Undefined */ diff --git a/html.h b/html.h index 749e7ef..2fd7e57 100644 --- a/html.h +++ b/html.h @@ -240,6 +240,8 @@ typedef struct { #define HTML_N_SECTION 146 #define HTML_N_DT 147 #define HTML_N_DD 148 +#define HTML_DFN 149 +#define HTML_N_DFN 150 /* pseudo tag */ #define HTML_SELECT_INT 160 diff --git a/tagtable.tab b/tagtable.tab index 774fde9..d50ab34 100644 --- a/tagtable.tab +++ b/tagtable.tab @@ -50,8 +50,8 @@ img HTML_IMG image HTML_IMG code HTML_NOP /code HTML_NOP -dfn HTML_NOP -/dfn HTML_NOP +dfn HTML_DFN +/dfn HTML_N_DFN em HTML_EM /em HTML_N_EM cite HTML_NOP