On Fri, 15 Nov 2019 11:55:34 +0000, Ian Collier wrote:
> In HTML prior to 5, <A> elements were not allowed to contain block
> elements such as <DIV>, and Lynx was written to this standard.
> However, in HTML 5, the content model of the <A> tag is "transparent"
> which means it is allowed to contain whatever the parent element may
> contain.

Attached ad hoc patch allows <a> to contain <div> and <dl> (like <p>).
(<dl> in <a> is used in https://news.yahoo.co.jp/pickup/6343763 )

------test.html
<html>
<a href="#"><div>div</div></a>
<a href="#"><dl><dt>dt</dt><dd>dd</dd></dl></a>
<a href="#"><p>p</p></a>
</html>

-- 
KIHARA, Hideto / de...@m1.interq.or.jp
diff -urp ../orig/lynx2.9.0dev.4/WWW/Library/Implementation/src0_HTMLDTD.h ./WWW/Library/Implementation/src0_HTMLDTD.h
--- ../orig/lynx2.9.0dev.4/WWW/Library/Implementation/src0_HTMLDTD.h	2015-12-14 08:08:45.000000000 +0900
+++ ./WWW/Library/Implementation/src0_HTMLDTD.h	2019-11-28 20:28:44.970080537 +0900
@@ -41,8 +41,8 @@
 #define T_DEL           0x00002,0x8BBCF,0x8FFFF,0xA7F8F,0xF7FBF,0x00003,0x00000
 #define T_DFN           0x00002,0x8B0CF,0x8FFFF,0x8778F,0xF7FBF,0x00003,0x00000
 #define T_DIR           0x00800,0x0B400,0x0F75F,0x37680,0x36FB7,0x84F7F,0x00000
-#define T_DIV           0x00200,0x8FBCF,0x8FFFF,0xB66A0,0xB7FFF,0x8031F,0x00004
-#define T_DL            0x00800,0x0C480,0x8FFFF,0x36680,0xB7FB7,0x0075F,0x00000
+#define T_DIV           0x00200,0x8FBCF,0x8FFFF,0xB66A0,0xB7FFF,0x80317,0x00004
+#define T_DL            0x00800,0x0C480,0x8FFFF,0x36680,0xB7FB7,0x00757,0x00000
 #define T_DLC           0x00800,0x0C480,0x8FFFF,0x36680,0xB7FB7,0x0075F,0x00000
 #define T_DT            0x00400,0x0B04F,0x0B1FF,0x00800,0x17FFF,0x8071F,0x00001
 #define T_EM            0x00002,0x8B04F,0x8FFFF,0xA778F,0xF7FAF,0x00003,0x00010
diff -urp ../orig/lynx2.9.0dev.4/WWW/Library/Implementation/src0_HTMLDTD.txt ./WWW/Library/Implementation/src0_HTMLDTD.txt
--- ../orig/lynx2.9.0dev.4/WWW/Library/Implementation/src0_HTMLDTD.txt	2015-12-14 08:08:45.000000000 +0900
+++ ./WWW/Library/Implementation/src0_HTMLDTD.txt	2019-11-28 20:28:09.320080535 +0900
@@ -1469,7 +1469,7 @@
 		icontains: FONTlike EMlike MATHlike Alike formula TRlike SELECTlike FORMlike Plike DIVlike LIlike ULlike BRlike APPLETlike HRlike MAPlike same
 		contained: TRlike FORMlike DIVlike LIlike APPLETlike HRlike outer BODYlike same
 		icontained: FONTlike EMlike MATHlike Alike formula TRlike SELECTlike FORMlike Plike DIVlike LIlike ULlike BRlike APPLETlike HRlike outer BODYlike same
-		canclose: FONTlike EMlike MATHlike Alike formula Plike DIVlike same
+		canclose: FONTlike EMlike MATHlike formula Plike DIVlike same
 		flags: mafse
 	37:DL
 		justify
@@ -1492,7 +1492,7 @@
 		icontains: FONTlike EMlike MATHlike Alike formula TRlike SELECTlike FORMlike Plike DIVlike LIlike ULlike BRlike APPLETlike HRlike MAPlike same
 		contained: FORMlike DIVlike LIlike APPLETlike HRlike outer BODYlike
 		icontained: FONTlike EMlike MATHlike formula TRlike FORMlike Plike DIVlike LIlike ULlike BRlike APPLETlike HRlike outer BODYlike same
-		canclose: FONTlike EMlike MATHlike Alike formula SELECTlike Plike DIVlike LIlike
+		canclose: FONTlike EMlike MATHlike formula SELECTlike Plike DIVlike LIlike
 		flags:
 	38:DLC
 		justify
diff -urp ../orig/lynx2.9.0dev.4/WWW/Library/Implementation/src1_HTMLDTD.h ./WWW/Library/Implementation/src1_HTMLDTD.h
--- ../orig/lynx2.9.0dev.4/WWW/Library/Implementation/src1_HTMLDTD.h	2015-12-14 08:08:45.000000000 +0900
+++ ./WWW/Library/Implementation/src1_HTMLDTD.h	2019-11-28 20:28:45.000080537 +0900
@@ -41,8 +41,8 @@
 #define T_DEL           0x00002,0x8BBCF,0x8FFFF,0xA7F8F,0xF7FBF,0x00003,0x00000
 #define T_DFN           0x00002,0x8B0CF,0x8FFFF,0x8778F,0xF7FBF,0x00003,0x00000
 #define T_DIR           0x00800,0x0B400,0x0F75F,0x37680,0x36FB7,0x84F7F,0x00000
-#define T_DIV           0x00200,0x8FBCF,0x8FFFF,0xB66A0,0xB7FFF,0x8031F,0x00004
-#define T_DL            0x00800,0x0C480,0x8FFFF,0x36680,0xB7FB7,0x0075F,0x00000
+#define T_DIV           0x00200,0x8FBCF,0x8FFFF,0xB66A0,0xB7FFF,0x80317,0x00004
+#define T_DL            0x00800,0x0C480,0x8FFFF,0x36680,0xB7FB7,0x00757,0x00000
 #define T_DLC           0x00800,0x0C480,0x8FFFF,0x36680,0xB7FB7,0x0075F,0x00000
 #define T_DT            0x00400,0x0B04F,0x0B1FF,0x00800,0x17FFF,0x8071F,0x00001
 #define T_EM            0x00002,0x8B04F,0x8FFFF,0xA778F,0xF7FAF,0x00003,0x00010
diff -urp ../orig/lynx2.9.0dev.4/WWW/Library/Implementation/src1_HTMLDTD.txt ./WWW/Library/Implementation/src1_HTMLDTD.txt
--- ../orig/lynx2.9.0dev.4/WWW/Library/Implementation/src1_HTMLDTD.txt	2015-12-14 08:08:45.000000000 +0900
+++ ./WWW/Library/Implementation/src1_HTMLDTD.txt	2019-11-28 20:28:30.160080536 +0900
@@ -1469,7 +1469,7 @@
 		icontains: FONTlike EMlike MATHlike Alike formula TRlike SELECTlike FORMlike Plike DIVlike LIlike ULlike BRlike APPLETlike HRlike MAPlike same
 		contained: TRlike FORMlike DIVlike LIlike APPLETlike HRlike outer BODYlike same
 		icontained: FONTlike EMlike MATHlike Alike formula TRlike SELECTlike FORMlike Plike DIVlike LIlike ULlike BRlike APPLETlike HRlike outer BODYlike same
-		canclose: FONTlike EMlike MATHlike Alike formula Plike DIVlike same
+		canclose: FONTlike EMlike MATHlike formula Plike DIVlike same
 		flags: mafse
 	37:DL
 		justify
@@ -1492,7 +1492,7 @@
 		icontains: FONTlike EMlike MATHlike Alike formula TRlike SELECTlike FORMlike Plike DIVlike LIlike ULlike BRlike APPLETlike HRlike MAPlike same
 		contained: FORMlike DIVlike LIlike APPLETlike HRlike outer BODYlike
 		icontained: FONTlike EMlike MATHlike formula TRlike FORMlike Plike DIVlike LIlike ULlike BRlike APPLETlike HRlike outer BODYlike same
-		canclose: FONTlike EMlike MATHlike Alike formula SELECTlike Plike DIVlike LIlike
+		canclose: FONTlike EMlike MATHlike formula SELECTlike Plike DIVlike LIlike
 		flags:
 	38:DLC
 		justify
_______________________________________________
Lynx-dev mailing list
Lynx-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lynx-dev

Reply via email to