@@ -38,7 +38,7 @@ public function data_single_tag_of_supported_elements() {
38
38
$ supported_elements = array (
39
39
'A ' ,
40
40
'ABBR ' ,
41
- 'ACRONYM ' , // Neutralized
41
+ 'ACRONYM ' , // Neutralized.
42
42
'ADDRESS ' ,
43
43
'ARTICLE ' ,
44
44
'ASIDE ' ,
@@ -47,13 +47,14 @@ public function data_single_tag_of_supported_elements() {
47
47
'BDI ' ,
48
48
'BDO ' ,
49
49
'BIG ' ,
50
- 'BLINK ' , // Deprecated
50
+ 'BLINK ' , // Deprecated.
51
51
'BUTTON ' ,
52
52
'CANVAS ' ,
53
- 'CENTER ' , // Neutralized
53
+ 'CENTER ' , // Neutralized.
54
54
'CITE ' ,
55
55
'CODE ' ,
56
56
'DATA ' ,
57
+ 'DD ' ,
57
58
'DATALIST ' ,
58
59
'DFN ' ,
59
60
'DEL ' ,
@@ -62,6 +63,7 @@ public function data_single_tag_of_supported_elements() {
62
63
'DIR ' ,
63
64
'DIV ' ,
64
65
'DL ' ,
66
+ 'DT ' ,
65
67
'EM ' ,
66
68
'FIELDSET ' ,
67
69
'FIGCAPTION ' ,
@@ -79,6 +81,7 @@ public function data_single_tag_of_supported_elements() {
79
81
'I ' ,
80
82
'IMG ' ,
81
83
'INS ' ,
84
+ 'LI ' ,
82
85
'ISINDEX ' , // Deprecated
83
86
'KBD ' ,
84
87
'LABEL ' ,
@@ -91,6 +94,7 @@ public function data_single_tag_of_supported_elements() {
91
94
'MULTICOL ' , // Deprecated
92
95
'NAV ' ,
93
96
'NEXTID ' , // Deprecated
97
+ 'OL ' ,
94
98
'OUTPUT ' ,
95
99
'P ' ,
96
100
'PICTURE ' ,
@@ -112,6 +116,7 @@ public function data_single_tag_of_supported_elements() {
112
116
'TIME ' ,
113
117
'TT ' ,
114
118
'U ' ,
119
+ 'UL ' ,
115
120
'VAR ' ,
116
121
'VIDEO ' ,
117
122
);
@@ -156,7 +161,7 @@ public function test_fails_when_encountering_unsupported_tag( $html ) {
156
161
*/
157
162
public function data_unsupported_elements () {
158
163
$ unsupported_elements = array (
159
- 'APPLET ' , // Deprecated
164
+ 'APPLET ' , // Deprecated.
160
165
'AREA ' ,
161
166
'BASE ' ,
162
167
'BGSOUND ' , // Deprecated; self-closing if self-closing flag provided, otherwise normal.
@@ -165,8 +170,6 @@ public function data_unsupported_elements() {
165
170
'CAPTION ' ,
166
171
'COL ' ,
167
172
'COLGROUP ' ,
168
- 'DD ' ,
169
- 'DT ' ,
170
173
'EMBED ' ,
171
174
'FORM ' ,
172
175
'FRAME ' ,
@@ -176,27 +179,25 @@ public function data_unsupported_elements() {
176
179
'HTML ' ,
177
180
'IFRAME ' ,
178
181
'INPUT ' ,
179
- 'KEYGEN ' , // Deprecated; void
180
- 'LI ' ,
182
+ 'KEYGEN ' , // Deprecated; void.
181
183
'LINK ' ,
182
184
'LISTING ' , // Deprecated, use PRE instead.
183
- 'MARQUEE ' , // Deprecated
185
+ 'MARQUEE ' , // Deprecated.
184
186
'MATH ' ,
185
187
'META ' ,
186
- 'NOBR ' , // Neutralized
187
- 'NOEMBED ' , // Neutralized
188
- 'NOFRAMES ' , // Neutralized
188
+ 'NOBR ' , // Neutralized.
189
+ 'NOEMBED ' , // Neutralized.
190
+ 'NOFRAMES ' , // Neutralized.
189
191
'NOSCRIPT ' ,
190
192
'OBJECT ' ,
191
- 'OL ' ,
192
193
'OPTGROUP ' ,
193
194
'OPTION ' ,
194
- 'PLAINTEXT ' , // Neutralized
195
+ 'PLAINTEXT ' , // Neutralized.
195
196
'PRE ' ,
196
- 'RB ' , // Neutralized
197
+ 'RB ' , // Neutralized.
197
198
'RP ' ,
198
199
'RT ' ,
199
- 'RTC ' , // Neutralized
200
+ 'RTC ' , // Neutralized.
200
201
'SCRIPT ' ,
201
202
'SELECT ' ,
202
203
'SOURCE ' ,
@@ -213,7 +214,6 @@ public function data_unsupported_elements() {
213
214
'TITLE ' ,
214
215
'TR ' ,
215
216
'TRACK ' ,
216
- 'UL ' ,
217
217
'WBR ' ,
218
218
'XMP ' , // Deprecated, use PRE instead.
219
219
);
@@ -348,6 +348,12 @@ public function data_html_target_with_breadcrumbs() {
348
348
),
349
349
'MAIN inside MAIN inside SPAN ' => array ( '<span><main><main target> ' , array ( 'HTML ' , 'BODY ' , 'SPAN ' , 'MAIN ' , 'MAIN ' ), 1 ),
350
350
'MAIN next to unclosed P ' => array ( '<p><main target> ' , array ( 'HTML ' , 'BODY ' , 'MAIN ' ), 1 ),
351
+ 'LI after unclosed LI ' => array ( '<li>one<li>two<li target>three ' , array ( 'HTML ' , 'BODY ' , 'LI ' ), 3 ),
352
+ 'LI in UL in LI ' => array ( '<ul><li>one<ul><li target>two ' , array ( 'HTML ' , 'BODY ' , 'UL ' , 'LI ' , 'UL ' , 'LI ' ), 1 ),
353
+ 'DD and DT mutually close, LI self-closes (dt 2) ' => array ( '<dd><dd><dt><dt target><dd><li><li> ' , array ( 'HTML ' , 'BODY ' , 'DT ' ), 2 ),
354
+ 'DD and DT mutually close, LI self-closes (dd 3) ' => array ( '<dd><dd><dt><dt><dd target><li><li> ' , array ( 'HTML ' , 'BODY ' , 'DD ' ), 3 ),
355
+ 'DD and DT mutually close, LI self-closes (li 1) ' => array ( '<dd><dd><dt><dt><dd><li target><li> ' , array ( 'HTML ' , 'BODY ' , 'DD ' , 'LI ' ), 1 ),
356
+ 'DD and DT mutually close, LI self-closes (li 2) ' => array ( '<dd><dd><dt><dt><dd><li><li target> ' , array ( 'HTML ' , 'BODY ' , 'DD ' , 'LI ' ), 2 ),
351
357
352
358
// H1 - H6 close out _any_ H1 - H6 when encountering _any_ of H1 - H6, making this section surprising.
353
359
'EM inside H3 after unclosed P ' => array ( '<p><h3><em target>Important Message</em></h3> ' , array ( 'HTML ' , 'BODY ' , 'H3 ' , 'EM ' ), 1 ),
0 commit comments