1 |
wakaba |
1.1 |
{"tests": [ |
2 |
|
|
|
3 |
wakaba |
1.3 |
{"description":"<!DOCTYPE", |
4 |
|
|
"input":"<!DOCTYPE", |
5 |
wakaba |
1.9 |
"output":["ParseError","ParseError",["DOCTYPE", null, null, null, false]]}, |
6 |
wakaba |
1.3 |
|
7 |
|
|
{"description":"<!DOCTYPE ", |
8 |
|
|
"input":"<!DOCTYPE ", |
9 |
wakaba |
1.9 |
"output":["ParseError",["DOCTYPE", null, null, null, false]]}, |
10 |
wakaba |
1.3 |
|
11 |
|
|
{"description":"<!DOCTYPE >", |
12 |
|
|
"input":"<!DOCTYPE >", |
13 |
wakaba |
1.9 |
"output":["ParseError",["DOCTYPE", null, null, null, false]]}, |
14 |
wakaba |
1.3 |
|
15 |
|
|
{"description":"<!DOCTYPE h", |
16 |
|
|
"input":"<!DOCTYPE h", |
17 |
wakaba |
1.9 |
"output":["ParseError",["DOCTYPE", "h", null, null, false]]}, |
18 |
wakaba |
1.3 |
|
19 |
|
|
{"description":"<!DOCTYPE H", |
20 |
|
|
"input":"<!DOCTYPE H", |
21 |
wakaba |
1.9 |
"output":["ParseError",["DOCTYPE", "H", null, null, false]]}, |
22 |
wakaba |
1.3 |
|
23 |
|
|
{"description":"<!DOCTYPE h>", |
24 |
|
|
"input":"<!DOCTYPE h>", |
25 |
wakaba |
1.9 |
"output":[["DOCTYPE", "h", null, null, true]]}, |
26 |
wakaba |
1.3 |
|
27 |
|
|
{"description":"<!DOCTYPE H>", |
28 |
|
|
"input":"<!DOCTYPE H>", |
29 |
wakaba |
1.9 |
"output":[["DOCTYPE", "H", null, null, true]]}, |
30 |
wakaba |
1.3 |
|
31 |
|
|
{"description":"<!DOCTYPE ht", |
32 |
|
|
"input":"<!DOCTYPE ht", |
33 |
wakaba |
1.9 |
"output":["ParseError",["DOCTYPE", "ht", null, null, false]]}, |
34 |
wakaba |
1.3 |
|
35 |
|
|
{"description":"<!DOCTYPE Ht", |
36 |
|
|
"input":"<!DOCTYPE Ht", |
37 |
wakaba |
1.9 |
"output":["ParseError",["DOCTYPE", "Ht", null, null, false]]}, |
38 |
wakaba |
1.3 |
|
39 |
|
|
{"description":"<!DOCTYPE hT", |
40 |
|
|
"input":"<!DOCTYPE hT", |
41 |
wakaba |
1.9 |
"output":["ParseError",["DOCTYPE", "hT", null, null, false]]}, |
42 |
wakaba |
1.3 |
|
43 |
|
|
{"description":"<!DOCTYPE ht>", |
44 |
|
|
"input":"<!DOCTYPE ht>", |
45 |
wakaba |
1.9 |
"output":[["DOCTYPE", "ht", null, null, true]]}, |
46 |
wakaba |
1.3 |
|
47 |
|
|
{"description":"<!DOCTYPE Ht>", |
48 |
|
|
"input":"<!DOCTYPE Ht>", |
49 |
wakaba |
1.9 |
"output":[["DOCTYPE", "Ht", null, null, true]]}, |
50 |
wakaba |
1.3 |
|
51 |
|
|
{"description":"<!DOCTYPE hT>", |
52 |
|
|
"input":"<!DOCTYPE hT>", |
53 |
wakaba |
1.9 |
"output":[["DOCTYPE", "hT", null, null, true]]}, |
54 |
wakaba |
1.3 |
|
55 |
|
|
{"description":"<!DOCTYPE hT>", |
56 |
|
|
"input":"<!DOCTYPE hT>", |
57 |
wakaba |
1.9 |
"output":[["DOCTYPE", "hT", null, null, true]]}, |
58 |
wakaba |
1.3 |
|
59 |
|
|
{"description":"<!DOCTYPE htm", |
60 |
|
|
"input":"<!DOCTYPE htm", |
61 |
wakaba |
1.9 |
"output":["ParseError",["DOCTYPE", "htm", null, null, false]]}, |
62 |
wakaba |
1.3 |
|
63 |
|
|
{"description":"<!DOCTYPE Htm", |
64 |
|
|
"input":"<!DOCTYPE Htm", |
65 |
wakaba |
1.9 |
"output":["ParseError",["DOCTYPE", "Htm", null, null, false]]}, |
66 |
wakaba |
1.3 |
|
67 |
|
|
{"description":"<!DOCTYPE hTM", |
68 |
|
|
"input":"<!DOCTYPE hTM", |
69 |
wakaba |
1.9 |
"output":["ParseError",["DOCTYPE", "hTM", null, null, false]]}, |
70 |
wakaba |
1.3 |
|
71 |
|
|
{"description":"<!DOCTYPE htm>", |
72 |
|
|
"input":"<!DOCTYPE htm>", |
73 |
wakaba |
1.9 |
"output":[["DOCTYPE", "htm", null, null, true]]}, |
74 |
wakaba |
1.3 |
|
75 |
|
|
{"description":"<!DOCTYPE Htm>", |
76 |
|
|
"input":"<!DOCTYPE Htm>", |
77 |
wakaba |
1.9 |
"output":[["DOCTYPE", "Htm", null, null, true]]}, |
78 |
wakaba |
1.3 |
|
79 |
|
|
{"description":"<!DOCTYPE hTM>", |
80 |
|
|
"input":"<!DOCTYPE hTM>", |
81 |
wakaba |
1.9 |
"output":[["DOCTYPE", "hTM", null, null, true]]}, |
82 |
wakaba |
1.3 |
|
83 |
|
|
{"description":"<!DOCTYPE html5", |
84 |
|
|
"input":"<!DOCTYPE html5", |
85 |
wakaba |
1.9 |
"output":["ParseError",["DOCTYPE", "html5", null, null, false]]}, |
86 |
wakaba |
1.3 |
|
87 |
|
|
{"description":"<!DOCTYPE html5>", |
88 |
|
|
"input":"<!DOCTYPE html5>", |
89 |
wakaba |
1.9 |
"output":[["DOCTYPE", "html5", null, null, true]]}, |
90 |
|
|
|
91 |
wakaba |
1.26 |
{"description": "VT in DOCTYPE state", |
92 |
|
|
"input": "<!DOCTYPE\u000b html>", |
93 |
|
|
"output": ["ParseError", "ParseError", |
94 |
|
|
["DOCTYPE", "\u000b", null, null, false]]}, |
95 |
|
|
|
96 |
|
|
{"description": "VT in before DOCTYPE name state", |
97 |
|
|
"input": "<!DOCTYPE \u000bhtml>", |
98 |
|
|
"output": [["DOCTYPE", "\u000bhtml", null, null, true]]}, |
99 |
|
|
|
100 |
|
|
{"description": "VT in DOCTYPE name state", |
101 |
|
|
"input": "<!DOCTYPE html\u000babcd>", |
102 |
|
|
"output": [["DOCTYPE", "html\u000babcd", null, null, true]]}, |
103 |
|
|
|
104 |
|
|
{"description": "VT in after DOCTYPE name state", |
105 |
|
|
"input": "<!DOCTYPE html \u000b>", |
106 |
|
|
"output": ["ParseError", ["DOCTYPE", "html", null, null, false]]}, |
107 |
|
|
|
108 |
|
|
{"description": "VT in before DOCTYPE public identifier state", |
109 |
|
|
"input": "<!DOCTYPE html PUBLIC \u000b\"xx\">", |
110 |
|
|
"output": ["ParseError", ["DOCTYPE", "html", null, null, false]]}, |
111 |
|
|
|
112 |
|
|
{"description": "VT in after DOCTYPE public identifier state", |
113 |
|
|
"input": "<!DOCTYPE html PUBLIC \"x\"\u000b>", |
114 |
|
|
"output": ["ParseError", ["DOCTYPE", "html", "x", null, false]]}, |
115 |
|
|
|
116 |
|
|
{"description": "VT in before DOCTYPE system identifier state", |
117 |
|
|
"input": "<!DOCTYPE html SYSTEM \u000b\"aa\">", |
118 |
|
|
"output": ["ParseError", ["DOCTYPE", "html", null, null, false]]}, |
119 |
|
|
|
120 |
|
|
{"description": "VT in after DOCTYPE system identifier state", |
121 |
|
|
"input": "<!DOCTYPE html SYSTEM \"a\"\u000b>", |
122 |
|
|
"output": ["ParseError", ["DOCTYPE", "html", null, "a", true]]}, |
123 |
|
|
|
124 |
wakaba |
1.9 |
{"description":"PUBLIC\u0022\u0022", |
125 |
|
|
"input":"<!DOCTYPE html PUBLIC\u0022\u0022>", |
126 |
|
|
"output":[["DOCTYPE", "html", "", null, true]]}, |
127 |
|
|
|
128 |
|
|
{"description":"PUBLIC''", |
129 |
|
|
"input":"<!DOCTYPE html PUBLIC''>", |
130 |
|
|
"output":[["DOCTYPE", "html", "", null, true]]}, |
131 |
|
|
|
132 |
|
|
{"description":"PUBLICbogus", |
133 |
|
|
"input":"<!DOCTYPE html PUBLICbogus>", |
134 |
|
|
"output":["ParseError",["DOCTYPE", "html", null, null, false]]}, |
135 |
|
|
|
136 |
|
|
{"description":"PUBLIC bogus", |
137 |
|
|
"input":"<!DOCTYPE html PUBLIC bogus>", |
138 |
|
|
"output":["ParseError",["DOCTYPE", "html", null, null, false]]}, |
139 |
|
|
|
140 |
|
|
{"description":"PUBLIC \u0022\u0022bogus", |
141 |
|
|
"input":"<!DOCTYPE html PUBLIC \u0022\u0022bogus>", |
142 |
|
|
"output":["ParseError",["DOCTYPE", "html", "", null, false]]}, |
143 |
|
|
|
144 |
|
|
{"description":"PUBLIC \u0022\u0022 bogus", |
145 |
|
|
"input":"<!DOCTYPE html PUBLIC \u0022\u0022 bogus>", |
146 |
|
|
"output":["ParseError",["DOCTYPE", "html", "", null, false]]}, |
147 |
|
|
|
148 |
|
|
{"description":"PUBLIC \u0022\u0022 \u0022\u0022bogus", |
149 |
|
|
"input":"<!DOCTYPE html PUBLIC \u0022\u0022 \u0022\u0022bogus>", |
150 |
wakaba |
1.20 |
"output":["ParseError",["DOCTYPE", "html", "", "", true]]}, |
151 |
wakaba |
1.9 |
|
152 |
|
|
{"description":"PUBLIC \u0022\u0022 \u0022\u0022 bogus", |
153 |
|
|
"input":"<!DOCTYPE html PUBLIC \u0022\u0022 \u0022\u0022 bogus>", |
154 |
wakaba |
1.20 |
"output":["ParseError",["DOCTYPE", "html", "", "", true]]}, |
155 |
wakaba |
1.9 |
|
156 |
|
|
{"description":"PUBLIC \u0022\u0022\u0022\u0022>", |
157 |
|
|
"input":"<!DOCTYPE html PUBLIC \u0022\u0022\u0022\u0022>", |
158 |
|
|
"output":[["DOCTYPE", "html", "", "", true]]}, |
159 |
|
|
|
160 |
|
|
{"description":"PUBLIC \u0022\u0022''>", |
161 |
|
|
"input":"<!DOCTYPE html PUBLIC \u0022\u0022''>", |
162 |
|
|
"output":[["DOCTYPE", "html", "", "", true]]}, |
163 |
wakaba |
1.3 |
|
164 |
wakaba |
1.13 |
{"description":"SYSTEM a", |
165 |
|
|
"input":"<!DOCTYPE html SYSTEM a>", |
166 |
|
|
"output":["ParseError", ["DOCTYPE", "html", null, null, false]]}, |
167 |
wakaba |
1.20 |
|
168 |
|
|
{"description": "garbage after SYSTEM literal", |
169 |
|
|
"input": "<!DOCTYPE html SYSTEM 'a' b>", |
170 |
|
|
"output": ["ParseError", ["DOCTYPE", "html", null, "a", true]]}, |
171 |
|
|
|
172 |
|
|
{"description": "garbage after PUBLIC and SYSTEM literal", |
173 |
|
|
"input": "<!DOCTYPE html PUBLIC 'c' 'a' b>", |
174 |
|
|
"output": ["ParseError", ["DOCTYPE", "html", "c", "a", true]]}, |
175 |
|
|
|
176 |
|
|
{"description": "garbage immediately after SYSTEM literal", |
177 |
|
|
"input": "<!DOCTYPE html SYSTEM 'a'b>", |
178 |
|
|
"output": ["ParseError", ["DOCTYPE", "html", null, "a", true]]}, |
179 |
|
|
|
180 |
|
|
{"description": "garbage immediately after PUBLIC and SYSTEM literal", |
181 |
|
|
"input": "<!DOCTYPE html PUBLIC 'c' 'a'b>", |
182 |
|
|
"output": ["ParseError", ["DOCTYPE", "html", "c", "a", true]]}, |
183 |
wakaba |
1.13 |
|
184 |
wakaba |
1.28 |
{"description": "DOCTYPe", |
185 |
|
|
"input": "<!DOCTYPe html>", |
186 |
|
|
"output": [["DOCTYPE", "html", null, null, true]]}, |
187 |
|
|
|
188 |
|
|
{"description": "PUBLIc", |
189 |
|
|
"input": "<!DOCTYPE html PUBLIc 'a' 'b'>", |
190 |
|
|
"output": [["DOCTYPE", "html", "a", "b", true]]}, |
191 |
|
|
|
192 |
|
|
{"description": "SYSTEm", |
193 |
|
|
"input": "<!DOCTYPE html SYSTEm 'a'>", |
194 |
|
|
"output": [["DOCTYPE", "html", null, "a", true]]}, |
195 |
|
|
|
196 |
wakaba |
1.21 |
{"description": "<!D>", |
197 |
|
|
"input": "<!D>", |
198 |
|
|
"output": ["ParseError", ["Comment", "D"]]}, |
199 |
|
|
|
200 |
|
|
{"description": "<!DO>", |
201 |
|
|
"input": "<!DO>", |
202 |
|
|
"output": ["ParseError", ["Comment", "DO"]]}, |
203 |
|
|
|
204 |
|
|
{"description": "<!DOc>", |
205 |
|
|
"input": "<!DOc>", |
206 |
|
|
"output": ["ParseError", ["Comment", "DOc"]]}, |
207 |
|
|
|
208 |
|
|
{"description": "<!dOcT>", |
209 |
|
|
"input": "<!dOcT>", |
210 |
|
|
"output": ["ParseError", ["Comment", "dOcT"]]}, |
211 |
|
|
|
212 |
|
|
{"description": "<!DoctY", |
213 |
|
|
"input": "<!DoctY", |
214 |
|
|
"output": ["ParseError", ["Comment", "DoctY"]]}, |
215 |
|
|
|
216 |
|
|
{"description": "<!doctyp!>", |
217 |
|
|
"input": "<!doctyp!>", |
218 |
|
|
"output": ["ParseError", ["Comment", "doctyp!"]]}, |
219 |
|
|
|
220 |
|
|
{"description": "<!Doc?>", |
221 |
|
|
"input": "<!Doc?>", |
222 |
|
|
"output": ["ParseError", ["Comment", "Doc?"]]}, |
223 |
|
|
|
224 |
|
|
{"description": "<!Doc<type>>", |
225 |
|
|
"input": "<!Doc<type>>", |
226 |
|
|
"output": ["ParseError", ["Comment", "Doc<type"], ["Character", ">"]]}, |
227 |
|
|
|
228 |
|
|
{"description": "<!DOCTYPE HTML P>", |
229 |
|
|
"input": "<!DOCTYPE HTML P>", |
230 |
|
|
"output": ["ParseError", ["DOCTYPE", "HTML", null, null, false]]}, |
231 |
|
|
|
232 |
|
|
{"description": "<!DOCTYPE HTML Pa>", |
233 |
|
|
"input": "<!DOCTYPE HTML Pa>", |
234 |
|
|
"output": ["ParseError", ["DOCTYPE", "HTML", null, null, false]]}, |
235 |
|
|
|
236 |
|
|
{"description": "<!DOCTYPE HTML Pua>", |
237 |
|
|
"input": "<!DOCTYPE HTML Pua>", |
238 |
|
|
"output": ["ParseError", ["DOCTYPE", "HTML", null, null, false]]}, |
239 |
|
|
|
240 |
|
|
{"description": "<!DOCTYPE HTML PUB>", |
241 |
|
|
"input": "<!DOCTYPE HTML PUB>", |
242 |
|
|
"output": ["ParseError", ["DOCTYPE", "HTML", null, null, false]]}, |
243 |
|
|
|
244 |
|
|
{"description": "<!DOCTYPE HTML pubL>", |
245 |
|
|
"input": "<!DOCTYPE HTML pubL>", |
246 |
|
|
"output": ["ParseError", ["DOCTYPE", "HTML", null, null, false]]}, |
247 |
|
|
|
248 |
|
|
{"description": "<!DOCTYPE HTML publication>", |
249 |
|
|
"input": "<!DOCTYPE HTML publication>", |
250 |
|
|
"output": ["ParseError", ["DOCTYPE", "HTML", null, null, false]]}, |
251 |
|
|
|
252 |
|
|
{"description": "<!DOCTYPE HTML publi>", |
253 |
|
|
"input": "<!DOCTYPE HTML publi>", |
254 |
|
|
"output": ["ParseError", ["DOCTYPE", "HTML", null, null, false]]}, |
255 |
|
|
|
256 |
|
|
{"description": "<!DOCTYPE HTML PULICID>", |
257 |
|
|
"input": "<!DOCTYPE HTML PUBLICID>", |
258 |
|
|
"output": ["ParseError", ["DOCTYPE", "HTML", null, null, false]]}, |
259 |
|
|
|
260 |
|
|
{"description": "<!DOCTYPE HTML S ''>", |
261 |
|
|
"input": "<!DOCTYPE HTML S ''>", |
262 |
|
|
"output": ["ParseError", ["DOCTYPE", "HTML", null, null, false]]}, |
263 |
|
|
|
264 |
|
|
{"description": "<!DOCTYPE HTML sy>", |
265 |
|
|
"input": "<!DOCTYPE HTML sy>", |
266 |
|
|
"output": ["ParseError", ["DOCTYPE", "HTML", null, null, false]]}, |
267 |
|
|
|
268 |
|
|
{"description": "<!DOCTYPE HTML sys ''>", |
269 |
|
|
"input": "<!DOCTYPE HTML sys ''>", |
270 |
|
|
"output": ["ParseError", ["DOCTYPE", "HTML", null, null, false]]}, |
271 |
|
|
|
272 |
|
|
{"description": "<!DOCTYPE HTML syst>", |
273 |
|
|
"input": "<!DOCTYPE HTML syst>", |
274 |
|
|
"output": ["ParseError", ["DOCTYPE", "HTML", null, null, false]]}, |
275 |
|
|
|
276 |
|
|
{"description": "<!DOCTYPE HTML SySter>", |
277 |
|
|
"input": "<!DOCTYPE HTML SySter>", |
278 |
|
|
"output": ["ParseError", ["DOCTYPE", "HTML", null, null, false]]}, |
279 |
|
|
|
280 |
|
|
{"description": "<!DOCTYPE HTML systemid>", |
281 |
|
|
"input": "<!DOCTYPE HTML systemid>", |
282 |
|
|
"output": ["ParseError", ["DOCTYPE", "HTML", null, null, false]]}, |
283 |
|
|
|
284 |
wakaba |
1.14 |
{"description":"<!---x-->", |
285 |
|
|
"input":"<!---x-->", |
286 |
|
|
"output":[["Comment", "-x"]]}, |
287 |
|
|
|
288 |
|
|
{"description":"<!----x-->", |
289 |
|
|
"input":"<!----x-->", |
290 |
|
|
"output":["ParseError", ["Comment", "--x"]]}, |
291 |
|
|
|
292 |
wakaba |
1.1 |
{"description":"non-PCDATA content model flag, start tag-like string", |
293 |
|
|
"contentModelFlags":["PLAINTEXT","RCDATA","CDATA"], |
294 |
|
|
"input":"<div>", |
295 |
wakaba |
1.2 |
"output":[["Character", "<div>"]]}, |
296 |
|
|
|
297 |
|
|
{"description":"end tag followed by character data", |
298 |
|
|
"contentModelFlags":["RCDATA","CDATA"], |
299 |
|
|
"lastStartTag":"xxx", |
300 |
|
|
"input":"AB</xxx>CD", |
301 |
wakaba |
1.4 |
"output":[["Character", "AB"],["EndTag", "xxx"],["Character", "CD"]]}, |
302 |
wakaba |
1.1 |
|
303 |
wakaba |
1.12 |
{"description":"NULL character reference", |
304 |
|
|
"input":"�", |
305 |
|
|
"output":["ParseError", ["Character", "\uFFFD"]]}, |
306 |
|
|
|
307 |
|
|
{"description":"NULL character reference", |
308 |
|
|
"input":"�", |
309 |
|
|
"output":["ParseError", ["Character", "\uFFFD"]]}, |
310 |
|
|
|
311 |
wakaba |
1.27 |
{"description": "U+0001 character reference", |
312 |
|
|
"input": "", |
313 |
|
|
"output": ["ParseError", ["Character", "\uFFFD"]]}, |
314 |
|
|
|
315 |
|
|
{"description": "U+0002 character reference", |
316 |
|
|
"input": "", |
317 |
|
|
"output": ["ParseError", ["Character", "\uFFFD"]]}, |
318 |
|
|
|
319 |
|
|
{"description": "U+0008 character reference", |
320 |
|
|
"input": "", |
321 |
|
|
"output": ["ParseError", ["Character", "\uFFFD"]]}, |
322 |
|
|
|
323 |
|
|
{"description": "U+0008 decimal character reference", |
324 |
|
|
"input": "", |
325 |
|
|
"output": ["ParseError", ["Character", "\uFFFD"]]}, |
326 |
|
|
|
327 |
|
|
{"description": "U+0009 character reference", |
328 |
|
|
"input": "	", |
329 |
|
|
"output": [["Character", "\u0009"]]}, |
330 |
|
|
|
331 |
|
|
{"description": "U+000A character reference", |
332 |
|
|
"input": "
", |
333 |
|
|
"output": [["Character", "\u000A"]]}, |
334 |
|
|
|
335 |
wakaba |
1.12 |
{"description":"character entity ", |
336 |
|
|
"input":" ", |
337 |
|
|
"output":["ParseError", ["Character", "\u000A"]]}, |
338 |
|
|
|
339 |
|
|
{"description":"character entity 
", |
340 |
|
|
"input":"
", |
341 |
|
|
"output":["ParseError", ["Character", "\u000A"]]}, |
342 |
|
|
|
343 |
|
|
{"description":"character entities ", |
344 |
|
|
"input":" ", |
345 |
|
|
"output":["ParseError", ["Character", "\u000A\u000A"]]}, |
346 |
|
|
|
347 |
|
|
{"description":"character entity followed by a LF", |
348 |
|
|
"input":" \u000A", |
349 |
|
|
"output":["ParseError", ["Character", "\u000A\u000A"]]}, |
350 |
|
|
|
351 |
wakaba |
1.27 |
{"description": "U+000B character reference", |
352 |
|
|
"input": "", |
353 |
|
|
"output": ["ParseError", ["Character", "\uFFFD"]]}, |
354 |
|
|
|
355 |
|
|
{"description": "U+000B decimal character reference", |
356 |
|
|
"input": "", |
357 |
|
|
"output": ["ParseError", ["Character", "\uFFFD"]]}, |
358 |
|
|
|
359 |
|
|
{"description": "U+000C character reference", |
360 |
|
|
"input": "", |
361 |
|
|
"output": [["Character", "\u000C"]]}, |
362 |
|
|
|
363 |
|
|
{"description": "U+000E character reference", |
364 |
|
|
"input": "", |
365 |
|
|
"output": ["ParseError", ["Character", "\uFFFD"]]}, |
366 |
|
|
|
367 |
|
|
{"description": "U+000F character reference", |
368 |
|
|
"input": "", |
369 |
|
|
"output": ["ParseError", ["Character", "\uFFFD"]]}, |
370 |
|
|
|
371 |
|
|
{"description": "U+000F decimal character reference", |
372 |
|
|
"input": "", |
373 |
|
|
"output": ["ParseError", ["Character", "\uFFFD"]]}, |
374 |
|
|
|
375 |
|
|
{"description": "U+0010 character reference", |
376 |
|
|
"input": "", |
377 |
|
|
"output": ["ParseError", ["Character", "\uFFFD"]]}, |
378 |
|
|
|
379 |
|
|
{"description": "U+001B character reference", |
380 |
|
|
"input": "", |
381 |
|
|
"output": ["ParseError", ["Character", "\uFFFD"]]}, |
382 |
|
|
|
383 |
|
|
{"description": "U+001F character reference", |
384 |
|
|
"input": "", |
385 |
|
|
"output": ["ParseError", ["Character", "\uFFFD"]]}, |
386 |
|
|
|
387 |
|
|
{"description": "U+0020 character reference", |
388 |
|
|
"input": " ", |
389 |
|
|
"output": [["Character", " "]]}, |
390 |
|
|
|
391 |
|
|
{"description": "U+007F character reference", |
392 |
|
|
"input": "", |
393 |
|
|
"output": ["ParseError", ["Character", "\uFFFD"]]}, |
394 |
|
|
|
395 |
wakaba |
1.4 |
{"description":"c1 character references", |
396 |
|
|
"input":"€‚ƒ„…†‡", |
397 |
|
|
"output":[ |
398 |
|
|
"ParseError", ["Character", "\u20AC"], |
399 |
|
|
"ParseError", ["Character", "\uFFFD"], |
400 |
|
|
"ParseError", ["Character", "\u201A"], |
401 |
|
|
"ParseError", ["Character", "\u0192"], |
402 |
|
|
"ParseError", ["Character", "\u201E"], |
403 |
|
|
"ParseError", ["Character", "\u2026"], |
404 |
|
|
"ParseError", ["Character", "\u2020"], |
405 |
|
|
"ParseError", ["Character", "\u2021"] |
406 |
|
|
]}, |
407 |
|
|
{"description":"c1 character references", |
408 |
|
|
"input":"ˆ‰Š‹ŒŽ", |
409 |
|
|
"output":[ |
410 |
|
|
"ParseError", ["Character", "\u02C6"], |
411 |
|
|
"ParseError", ["Character", "\u2030"], |
412 |
|
|
"ParseError", ["Character", "\u0160"], |
413 |
|
|
"ParseError", ["Character", "\u2039"], |
414 |
|
|
"ParseError", ["Character", "\u0152"], |
415 |
|
|
"ParseError", ["Character", "\uFFFD"], |
416 |
|
|
"ParseError", ["Character", "\u017D"], |
417 |
|
|
"ParseError", ["Character", "\uFFFD"] |
418 |
|
|
]}, |
419 |
|
|
{"description":"c1 character references", |
420 |
|
|
"input":"‘’“”•–—", |
421 |
|
|
"output":[ |
422 |
|
|
"ParseError", ["Character", "\uFFFD"], |
423 |
|
|
"ParseError", ["Character", "\u2018"], |
424 |
|
|
"ParseError", ["Character", "\u2019"], |
425 |
|
|
"ParseError", ["Character", "\u201C"], |
426 |
|
|
"ParseError", ["Character", "\u201D"], |
427 |
|
|
"ParseError", ["Character", "\u2022"], |
428 |
|
|
"ParseError", ["Character", "\u2013"], |
429 |
|
|
"ParseError", ["Character", "\u2014"] |
430 |
|
|
]}, |
431 |
|
|
{"description":"c1 character references", |
432 |
|
|
"input":"˜™š›œžŸ", |
433 |
|
|
"output":[ |
434 |
|
|
"ParseError", ["Character", "\u02DC"], |
435 |
|
|
"ParseError", ["Character", "\u2122"], |
436 |
|
|
"ParseError", ["Character", "\u0161"], |
437 |
|
|
"ParseError", ["Character", "\u203A"], |
438 |
|
|
"ParseError", ["Character", "\u0153"], |
439 |
|
|
"ParseError", ["Character", "\uFFFD"], |
440 |
|
|
"ParseError", ["Character", "\u017E"], |
441 |
|
|
"ParseError", ["Character", "\u0178"] |
442 |
|
|
]}, |
443 |
|
|
|
444 |
|
|
{"description":"c1 character references", |
445 |
|
|
"input":"€‚ƒ„…†‡", |
446 |
|
|
"output":[ |
447 |
|
|
"ParseError", ["Character", "\u20AC"], |
448 |
|
|
"ParseError", ["Character", "\uFFFD"], |
449 |
|
|
"ParseError", ["Character", "\u201A"], |
450 |
|
|
"ParseError", ["Character", "\u0192"], |
451 |
|
|
"ParseError", ["Character", "\u201E"], |
452 |
|
|
"ParseError", ["Character", "\u2026"], |
453 |
|
|
"ParseError", ["Character", "\u2020"], |
454 |
|
|
"ParseError", ["Character", "\u2021"] |
455 |
|
|
]}, |
456 |
|
|
{"description":"c1 character references", |
457 |
|
|
"input":"ˆ‰Š‹ŒŽ", |
458 |
|
|
"output":[ |
459 |
|
|
"ParseError", ["Character", "\u02C6"], |
460 |
|
|
"ParseError", ["Character", "\u2030"], |
461 |
|
|
"ParseError", ["Character", "\u0160"], |
462 |
|
|
"ParseError", ["Character", "\u2039"], |
463 |
|
|
"ParseError", ["Character", "\u0152"], |
464 |
|
|
"ParseError", ["Character", "\uFFFD"], |
465 |
|
|
"ParseError", ["Character", "\u017D"], |
466 |
|
|
"ParseError", ["Character", "\uFFFD"] |
467 |
|
|
]}, |
468 |
|
|
{"description":"c1 character references", |
469 |
|
|
"input":"‘’“”•–—", |
470 |
|
|
"output":[ |
471 |
|
|
"ParseError", ["Character", "\uFFFD"], |
472 |
|
|
"ParseError", ["Character", "\u2018"], |
473 |
|
|
"ParseError", ["Character", "\u2019"], |
474 |
|
|
"ParseError", ["Character", "\u201C"], |
475 |
|
|
"ParseError", ["Character", "\u201D"], |
476 |
|
|
"ParseError", ["Character", "\u2022"], |
477 |
|
|
"ParseError", ["Character", "\u2013"], |
478 |
|
|
"ParseError", ["Character", "\u2014"] |
479 |
|
|
]}, |
480 |
|
|
{"description":"c1 character references", |
481 |
|
|
"input":"˜™š›œžŸ", |
482 |
|
|
"output":[ |
483 |
|
|
"ParseError", ["Character", "\u02DC"], |
484 |
|
|
"ParseError", ["Character", "\u2122"], |
485 |
|
|
"ParseError", ["Character", "\u0161"], |
486 |
|
|
"ParseError", ["Character", "\u203A"], |
487 |
|
|
"ParseError", ["Character", "\u0153"], |
488 |
|
|
"ParseError", ["Character", "\uFFFD"], |
489 |
|
|
"ParseError", ["Character", "\u017E"], |
490 |
|
|
"ParseError", ["Character", "\u0178"] |
491 |
wakaba |
1.5 |
]}, |
492 |
|
|
|
493 |
wakaba |
1.16 |
{"description":"Numeric entity representing a Windows-1252 'codepoint'", |
494 |
|
|
"input":"‰", |
495 |
|
|
"output":["ParseError", ["Character", "\u2030"]]}, |
496 |
|
|
|
497 |
|
|
{"description":"Hexadecimal entity representing a Windows-1252 'codepoint'", |
498 |
|
|
"input":"‰", |
499 |
|
|
"output":["ParseError", ["Character", "\u2030"]]}, |
500 |
|
|
|
501 |
wakaba |
1.12 |
{"description":"surrogate character reference", |
502 |
|
|
"input":"�", |
503 |
|
|
"output":["ParseError", ["Character", "\uFFFD"]]}, |
504 |
|
|
|
505 |
|
|
{"description":"surrogate character references", |
506 |
|
|
"input":"��", |
507 |
|
|
"output":["ParseError", ["Character", "\uFFFD"], |
508 |
|
|
"ParseError", ["Character", "\uFFFD"]]}, |
509 |
|
|
|
510 |
|
|
{"description":"surrogate character reference", |
511 |
|
|
"input":"\uD800�", |
512 |
wakaba |
1.22 |
"output":["ParseError", ["Character", "\uD800"], |
513 |
wakaba |
1.12 |
"ParseError", ["Character", "\uFFFD"]]}, |
514 |
|
|
|
515 |
|
|
{"description":"surrogate character reference", |
516 |
|
|
"input":"�\uDFFF", |
517 |
wakaba |
1.22 |
"output":["ParseError", ["Character", "\uFFFD"], |
518 |
|
|
"ParseError", ["Character", "\uDFFF"]]}, |
519 |
wakaba |
1.12 |
|
520 |
|
|
{"description":"surrogate character reference", |
521 |
|
|
"input":"�", |
522 |
|
|
"output":["ParseError", ["Character", "\uFFFD"]]}, |
523 |
|
|
|
524 |
|
|
{"description":"surrogate character reference", |
525 |
|
|
"input":"�", |
526 |
|
|
"output":["ParseError", ["Character", "\uFFFD"]]}, |
527 |
wakaba |
1.27 |
|
528 |
|
|
{"description": "U+FDD0 character reference", |
529 |
|
|
"input": "", |
530 |
|
|
"output": ["ParseError", ["Character", "\uFFFD"]]}, |
531 |
|
|
|
532 |
|
|
{"description": "U+FDD0 decimal character reference", |
533 |
|
|
"input": "", |
534 |
|
|
"output": ["ParseError", ["Character", "\uFFFD"]]}, |
535 |
|
|
|
536 |
|
|
{"description": "U+FDDF character reference", |
537 |
|
|
"input": "", |
538 |
|
|
"output": ["ParseError", ["Character", "\uFFFD"]]}, |
539 |
|
|
|
540 |
|
|
{"description": "U+FFFE character reference", |
541 |
|
|
"input": "", |
542 |
|
|
"output": ["ParseError", ["Character", "\uFFFD"]]}, |
543 |
|
|
|
544 |
|
|
{"description": "U+FFFE decimal character reference", |
545 |
|
|
"input": "", |
546 |
|
|
"output": ["ParseError", ["Character", "\uFFFD"]]}, |
547 |
|
|
|
548 |
|
|
{"description": "U+FFFF character reference", |
549 |
|
|
"input": "", |
550 |
|
|
"output": ["ParseError", ["Character", "\uFFFD"]]}, |
551 |
|
|
|
552 |
|
|
{"description": "U+FFFF decimal character reference", |
553 |
|
|
"input": "", |
554 |
|
|
"output": ["ParseError", ["Character", "\uFFFD"]]}, |
555 |
|
|
|
556 |
|
|
{"description": "U+1FFFE character reference", |
557 |
|
|
"input": "", |
558 |
|
|
"output": ["ParseError", ["Character", "\uFFFD"]]}, |
559 |
|
|
|
560 |
|
|
{"description": "U+1FFFF character reference", |
561 |
|
|
"input": "", |
562 |
|
|
"output": ["ParseError", ["Character", "\uFFFD"]]}, |
563 |
|
|
|
564 |
|
|
{"description": "U+10FFFE character reference", |
565 |
|
|
"input": "", |
566 |
|
|
"output": ["ParseError", ["Character", "\uFFFD"]]}, |
567 |
|
|
|
568 |
|
|
{"description": "U+10FFFE decimal character reference", |
569 |
|
|
"input": "", |
570 |
|
|
"output": ["ParseError", ["Character", "\uFFFD"]]}, |
571 |
|
|
|
572 |
|
|
{"description": "U+10FFFF character reference", |
573 |
|
|
"input": "", |
574 |
|
|
"output": ["ParseError", ["Character", "\uFFFD"]]}, |
575 |
|
|
|
576 |
|
|
{"description": "U+10FFFF decimal character reference", |
577 |
|
|
"input": "", |
578 |
|
|
"output": ["ParseError", ["Character", "\uFFFD"]]}, |
579 |
wakaba |
1.12 |
|
580 |
|
|
{"description":"non-Unicode character reference", |
581 |
|
|
"input":"�", |
582 |
|
|
"output":["ParseError", ["Character", "\uFFFD"]]}, |
583 |
|
|
|
584 |
|
|
{"description":"non-Unicode character reference", |
585 |
|
|
"input":"�", |
586 |
|
|
"output":["ParseError", ["Character", "\uFFFD"]]}, |
587 |
|
|
|
588 |
wakaba |
1.15 |
{"description":"Broken hcro (&#x)", |
589 |
|
|
"input":"&#x", |
590 |
|
|
"output":["ParseError", ["Character", "&#x"]]}, |
591 |
|
|
|
592 |
|
|
{"description":"Broken hcro (&#X)", |
593 |
|
|
"input":"&#X", |
594 |
|
|
"output":["ParseError", ["Character", "&#X"]]}, |
595 |
|
|
|
596 |
|
|
{"description":"Broken hcro (&#x;)", |
597 |
|
|
"input":"&#x;", |
598 |
|
|
"output":["ParseError", ["Character", "&#x;"]]}, |
599 |
|
|
|
600 |
|
|
{"description":"Broken hcro (&#X;)", |
601 |
|
|
"input":"&#X;", |
602 |
|
|
"output":["ParseError", ["Character", "&#X;"]]}, |
603 |
|
|
|
604 |
|
|
{"description":"Broken hcro (&#xg)", |
605 |
|
|
"input":"&#xg", |
606 |
|
|
"output":["ParseError", ["Character", "&#xg"]]}, |
607 |
|
|
|
608 |
|
|
{"description":"Broken hcro (&#Xg)", |
609 |
|
|
"input":"&#Xg", |
610 |
|
|
"output":["ParseError", ["Character", "&#Xg"]]}, |
611 |
|
|
|
612 |
|
|
{"description":"Broken hcro (&#xg;)", |
613 |
|
|
"input":"&#xg;", |
614 |
|
|
"output":["ParseError", ["Character", "&#xg;"]]}, |
615 |
|
|
|
616 |
|
|
{"description":"Broken hcro (&#Xg;)", |
617 |
|
|
"input":"&#Xg;", |
618 |
|
|
"output":["ParseError", ["Character", "&#Xg;"]]}, |
619 |
|
|
|
620 |
|
|
{"description":"Broken hcro (&#x!)", |
621 |
|
|
"input":"&#x!", |
622 |
|
|
"output":["ParseError", ["Character", "&#x!"]]}, |
623 |
|
|
|
624 |
|
|
{"description":"Broken hcro (&#X!)", |
625 |
|
|
"input":"&#X!", |
626 |
|
|
"output":["ParseError", ["Character", "&#X!"]]}, |
627 |
|
|
|
628 |
wakaba |
1.5 |
{"description":"NULL character", |
629 |
|
|
"input":"\u0000", |
630 |
wakaba |
1.6 |
"output":["ParseError",["Character", "\uFFFD"]]}, |
631 |
|
|
|
632 |
|
|
{"description":"™", |
633 |
|
|
"input":"™", |
634 |
wakaba |
1.7 |
"output":[["Character", "\u2122"]]}, |
635 |
|
|
|
636 |
|
|
{"description":"⟨", |
637 |
|
|
"input":"⟨", |
638 |
wakaba |
1.18 |
"output":[["Character", "\u27E8"]]}, |
639 |
wakaba |
1.7 |
|
640 |
|
|
{"description":"⟩", |
641 |
|
|
"input":"⟩", |
642 |
wakaba |
1.18 |
"output":[["Character", "\u27E9"]]}, |
643 |
wakaba |
1.7 |
|
644 |
|
|
{"description":"&;", |
645 |
|
|
"input":"&;", |
646 |
wakaba |
1.8 |
"output":[["Character", "&;"]]}, |
647 |
|
|
|
648 |
wakaba |
1.11 |
{"description":"&HT", |
649 |
|
|
"input":"&\u0009", |
650 |
|
|
"output":[["Character", "&\u0009"]]}, |
651 |
|
|
|
652 |
|
|
{"description":"&LF", |
653 |
|
|
"input":"&\u000A", |
654 |
|
|
"output":[["Character", "&\u000A"]]}, |
655 |
|
|
|
656 |
wakaba |
1.26 |
{"description": "&VT", |
657 |
|
|
"input": "&\u000B", |
658 |
|
|
"output": ["ParseError", ["Character", "&\u000B"]]}, |
659 |
wakaba |
1.11 |
|
660 |
|
|
{"description":"&FF", |
661 |
|
|
"input":"&\u000C", |
662 |
|
|
"output":[["Character", "&\u000C"]]}, |
663 |
|
|
|
664 |
|
|
{"description":"&SP", |
665 |
|
|
"input":"& ", |
666 |
|
|
"output":[["Character", "& "]]}, |
667 |
|
|
|
668 |
|
|
{"description":"&<", |
669 |
|
|
"input":"&<", |
670 |
wakaba |
1.12 |
"output":[["Character", "&"], "ParseError", ["Character", "<"]]}, |
671 |
wakaba |
1.11 |
|
672 |
|
|
{"description":"&<p>", |
673 |
|
|
"input":"&<p>", |
674 |
|
|
"output":[["Character", "&"], ["StartTag", "p", {}]]}, |
675 |
|
|
|
676 |
|
|
{"description":"&&", |
677 |
|
|
"input":"&&", |
678 |
|
|
"output":[["Character", "&&"]]}, |
679 |
|
|
|
680 |
|
|
{"description":"&&", |
681 |
|
|
"input":"&&", |
682 |
|
|
"output":[["Character", "&&"]]}, |
683 |
|
|
|
684 |
|
|
{"description":"&", |
685 |
|
|
"input":"&", |
686 |
|
|
"output":[["Character", "&"]]}, |
687 |
wakaba |
1.12 |
|
688 |
|
|
{"description":"named character reference w/o refc", |
689 |
|
|
"input":"&abc", |
690 |
|
|
"output":["ParseError", ["Character", "&abc"]]}, |
691 |
|
|
|
692 |
|
|
{"description":"named character reference", |
693 |
|
|
"input":"&abc", |
694 |
|
|
"output":[["Character", "&abc"]]}, |
695 |
|
|
|
696 |
|
|
{"description":"named character reference w/o refc", |
697 |
|
|
"input":"&abc", |
698 |
|
|
"output":["ParseError", ["Character", "&abc"]]}, |
699 |
|
|
|
700 |
|
|
{"description":"unknown named character reference", |
701 |
|
|
"input":"&abc;", |
702 |
|
|
"output":["ParseError", ["Character", "&abc;"]]}, |
703 |
|
|
|
704 |
|
|
{"description":"named character reference w/o refc in attr", |
705 |
|
|
"input":"<a href='&abc'>", |
706 |
|
|
"output":["ParseError", ["StartTag", "a", {"href": "&abc"}]]}, |
707 |
|
|
|
708 |
|
|
{"description":"named character reference in attr", |
709 |
|
|
"input":"<a href='&abc'>", |
710 |
|
|
"output":[["StartTag", "a", {"href": "&abc"}]]}, |
711 |
|
|
|
712 |
|
|
{"description":"named character reference w/o refc in attr", |
713 |
|
|
"input":"<a href='&abc'>", |
714 |
|
|
"output":["ParseError", ["StartTag", "a", {"href": "&abc"}]]}, |
715 |
|
|
|
716 |
|
|
{"description":"unknown named character reference in attr", |
717 |
|
|
"input":"<a href='&abc;'>", |
718 |
|
|
"output":["ParseError", ["StartTag", "a", {"href": "&abc;"}]]}, |
719 |
wakaba |
1.15 |
|
720 |
|
|
{"description":"entity w/o refc at the end of unterminated attribute value", |
721 |
|
|
"input":"<a href='©", |
722 |
|
|
"output":["ParseError", "ParseError", ["StartTag", "a", {"href": "\u00A9"}]]}, |
723 |
|
|
|
724 |
|
|
{"description":"entity w/o refc at the end of attribute value", |
725 |
|
|
"input":"<a href='©'>", |
726 |
|
|
"output":["ParseError", ["StartTag", "a", {"href": "\u00A9"}]]}, |
727 |
|
|
|
728 |
|
|
{"description":"entity w/refc at the end of attribute value", |
729 |
|
|
"input":"<a href='©'>", |
730 |
|
|
"output":[["StartTag", "a", {"href": "\u00A9"}]]}, |
731 |
|
|
|
732 |
|
|
{"description":"entity w/o refc href='©!'", |
733 |
|
|
"input":"<a href='©!'>", |
734 |
|
|
"output":["ParseError", ["StartTag", "a", {"href": "\u00A9!"}]]}, |
735 |
|
|
|
736 |
|
|
{"description":"entity w/o refc href='©=ok'", |
737 |
|
|
"input":"<a href='©=ok'>", |
738 |
|
|
"output":["ParseError", ["StartTag", "a", {"href": "\u00A9=ok"}]]}, |
739 |
|
|
|
740 |
|
|
{"description":"entity w/o refc href='©right'", |
741 |
|
|
"input":"<a href='©right'>", |
742 |
|
|
"output":["ParseError", ["StartTag", "a", {"href": "©right"}]]}, |
743 |
|
|
|
744 |
|
|
{"description":"entity w/o refc href='©right;'", |
745 |
|
|
"input":"<a href='©right;'>", |
746 |
|
|
"output":["ParseError", ["StartTag", "a", {"href": "©right;"}]]}, |
747 |
|
|
|
748 |
|
|
{"description":"entity w/o refc href='©rightc'", |
749 |
|
|
"input":"<a href='©rightc'>", |
750 |
|
|
"output":["ParseError", ["StartTag", "a", {"href": "©rightc"}]]}, |
751 |
|
|
|
752 |
|
|
{"description":"entity w/o refc href='©rightcd'", |
753 |
|
|
"input":"<a href='©rightcd'>", |
754 |
|
|
"output":["ParseError", ["StartTag", "a", {"href": "©rightcd"}]]}, |
755 |
wakaba |
1.11 |
|
756 |
wakaba |
1.8 |
{"description":"cdata end tag containing <", |
757 |
|
|
"contentModelFlags":["RCDATA","CDATA"], |
758 |
|
|
"lastStartTag":"xxx", |
759 |
|
|
"input":"</xxx<div>", |
760 |
wakaba |
1.10 |
"output":[["Character", "</xxx<div>"]]}, |
761 |
wakaba |
1.8 |
|
762 |
wakaba |
1.26 |
{"description":"cdata end tag containing VT", |
763 |
|
|
"contentModelFlags":["RCDATA","CDATA"], |
764 |
|
|
"lastStartTag":"xxx", |
765 |
|
|
"input":"</xxx\u000Babc", |
766 |
|
|
"output":[["Character", "</xxx\u000Babc"]]}, |
767 |
|
|
|
768 |
wakaba |
1.8 |
{"description":"< in tag name state", |
769 |
|
|
"input":"<p<div>", |
770 |
|
|
"output":[["StartTag", "p<div", {}]]}, |
771 |
|
|
|
772 |
wakaba |
1.26 |
{"description":"VT in tag name state", |
773 |
|
|
"input":"<p\u000ba>", |
774 |
|
|
"output":[["StartTag", "p\u000Ba", {}]]}, |
775 |
|
|
|
776 |
wakaba |
1.8 |
{"description":"< in before attribute name state", |
777 |
|
|
"input":"<p <div>", |
778 |
|
|
"output":[["StartTag", "p", {"<div":""}]]}, |
779 |
|
|
|
780 |
wakaba |
1.26 |
{"description":"VT in before attribute name state", |
781 |
|
|
"input":"<p \u000bx>", |
782 |
|
|
"output":[["StartTag", "p", {"\u000Bx":""}]]}, |
783 |
|
|
|
784 |
wakaba |
1.8 |
{"description":"< in attribute name state", |
785 |
|
|
"input":"<p align<div>", |
786 |
|
|
"output":[["StartTag", "p", {"align<div":""}]]}, |
787 |
|
|
|
788 |
wakaba |
1.26 |
{"description":"VT in attribute name state", |
789 |
|
|
"input":"<p a\u000bc>", |
790 |
|
|
"output":[["StartTag", "p", {"a\u000bc":""}]]}, |
791 |
|
|
|
792 |
wakaba |
1.8 |
{"description":"< in after attribute name state", |
793 |
|
|
"input":"<p align <div>", |
794 |
|
|
"output":[["StartTag", "p", {"align":"","<div":""}]]}, |
795 |
|
|
|
796 |
wakaba |
1.26 |
{"description":"VT in after attribute name state", |
797 |
|
|
"input":"<p a \u000bb>", |
798 |
|
|
"output":[["StartTag", "p", {"a":"","\u000bb":""}]]}, |
799 |
|
|
|
800 |
wakaba |
1.8 |
{"description":"< in before attribute value state", |
801 |
|
|
"input":"<p align=<div>", |
802 |
|
|
"output":[["StartTag", "p", {"align":"<div"}]]}, |
803 |
|
|
|
804 |
wakaba |
1.26 |
{"description":"VT in before attribute value state", |
805 |
|
|
"input":"<p a=\u000bc>", |
806 |
|
|
"output":[["StartTag", "p", {"a":"\u000bc"}]]}, |
807 |
|
|
|
808 |
wakaba |
1.8 |
{"description":"< in attribute value (unquoted) state", |
809 |
|
|
"input":"<p align=left<div>", |
810 |
|
|
"output":[["StartTag", "p", {"align":"left<div"}]]}, |
811 |
|
|
|
812 |
wakaba |
1.26 |
{"description":"VT in attribute value (unquoted) state", |
813 |
|
|
"input":"<p align=left\u000bc>", |
814 |
|
|
"output":[["StartTag", "p", {"align":"left\u000bc"}]]}, |
815 |
|
|
|
816 |
wakaba |
1.8 |
{"description":"< in attribute value (single-unquoted) state", |
817 |
|
|
"input":"<p align='left<div>", |
818 |
|
|
"output":["ParseError", ["StartTag", "p", {"align":"left<div>"}]]}, |
819 |
|
|
|
820 |
|
|
{"description":"< in attribute value (double-unquoted) state", |
821 |
|
|
"input":"<p align=\u0022left<div>", |
822 |
wakaba |
1.17 |
"output":["ParseError", ["StartTag", "p", {"align":"left<div>"}]]}, |
823 |
wakaba |
1.26 |
|
824 |
|
|
{"description": "< in after attribute value (quoted) state", |
825 |
|
|
"input": "<p a=\"b\"\u000bc>", |
826 |
|
|
"output": ["ParseError", ["StartTag", "p", {"a":"b", "\u000bc": ""}]]}, |
827 |
wakaba |
1.17 |
|
828 |
|
|
{"description":"/''b=\"\"", |
829 |
|
|
"input": "<a /''b=\"\">", |
830 |
wakaba |
1.19 |
"output": ["ParseError", "ParseError", "ParseError", |
831 |
|
|
["StartTag", "a", {"''b": ""}]]}, |
832 |
wakaba |
1.17 |
|
833 |
|
|
{"description":"/\"\"b=\"\"", |
834 |
|
|
"input": "<a /\"\"b=\"\">", |
835 |
wakaba |
1.19 |
"output": ["ParseError", "ParseError", "ParseError", |
836 |
|
|
["StartTag", "a", {"\"\"b": ""}]]}, |
837 |
wakaba |
1.17 |
|
838 |
|
|
{"description":"\"b=\"\"", |
839 |
|
|
"input": "<a \"b=\"\">", |
840 |
wakaba |
1.19 |
"output": ["ParseError", ["StartTag", "a", {"\"b": ""}]]}, |
841 |
wakaba |
1.17 |
|
842 |
|
|
{"description":"\"\"b=\"\"", |
843 |
|
|
"input": "<a \"\"b=\"\">", |
844 |
wakaba |
1.19 |
"output": ["ParseError", "ParseError", ["StartTag", "a", {"\"\"b": ""}]]}, |
845 |
wakaba |
1.17 |
|
846 |
|
|
{"description":"'b=\"\"", |
847 |
|
|
"input": "<a 'b=\"\">", |
848 |
wakaba |
1.19 |
"output": ["ParseError", ["StartTag", "a", {"'b": ""}]]}, |
849 |
wakaba |
1.17 |
|
850 |
|
|
{"description":"''b=\"\"", |
851 |
|
|
"input": "<a ''b=\"\">", |
852 |
wakaba |
1.19 |
"output": ["ParseError", "ParseError", ["StartTag", "a", {"''b": ""}]]}, |
853 |
wakaba |
1.17 |
|
854 |
|
|
{"description":"/b=\"\"", |
855 |
|
|
"input": "<a /b=\"\">", |
856 |
|
|
"output": ["ParseError", ["StartTag", "a", {"b": ""}]]}, |
857 |
|
|
|
858 |
|
|
{"description":"b/=\"\"", |
859 |
|
|
"input": "<a b/=\"\">", |
860 |
wakaba |
1.19 |
"output": ["ParseError", "ParseError", "ParseError", "ParseError", |
861 |
|
|
["StartTag", "a", {"b": "", "=\"\"": ""}]]}, |
862 |
wakaba |
1.17 |
|
863 |
|
|
{"description":"b/c=\"\"", |
864 |
|
|
"input": "<a b/c=\"\">", |
865 |
|
|
"output": ["ParseError", ["StartTag", "a", {"b": "", "c": ""}]]}, |
866 |
|
|
|
867 |
|
|
{"description":"bc[NULL]=\"\"", |
868 |
|
|
"input": "<a bc\u0000=\"\">", |
869 |
|
|
"output": ["ParseError", ["StartTag", "a", {"bc\uFFFD": ""}]]}, |
870 |
|
|
|
871 |
|
|
{"description":"b[NULL]c=\"\"", |
872 |
|
|
"input": "<a b\u0000c=\"\">", |
873 |
|
|
"output": ["ParseError", ["StartTag", "a", {"b\uFFFDc": ""}]]}, |
874 |
|
|
|
875 |
|
|
{"description":"[NULL]bc=\"\"", |
876 |
|
|
"input": "<a \u0000bc=\"\">", |
877 |
wakaba |
1.19 |
"output": ["ParseError", ["StartTag", "a", {"\uFFFDbc": ""}]]}, |
878 |
|
|
|
879 |
|
|
{"description": "<span ===>", |
880 |
|
|
"input": "<span ===>", |
881 |
|
|
"output": ["ParseError", "ParseError", ["StartTag", "span", {"=": "="}]]}, |
882 |
|
|
|
883 |
|
|
{"description": "<span a==>", |
884 |
|
|
"input": "<span a==>", |
885 |
|
|
"output": ["ParseError", ["StartTag", "span", {"a": "="}]]}, |
886 |
|
|
|
887 |
|
|
{"description": "<span ==a>", |
888 |
|
|
"input": "<span ==a>", |
889 |
|
|
"output": ["ParseError", ["StartTag", "span", {"=": "a"}]]}, |
890 |
|
|
|
891 |
|
|
{"description": "<span a=b=>", |
892 |
|
|
"input": "<span a=b=>", |
893 |
|
|
"output": ["ParseError", ["StartTag", "span", {"a": "b="}]]}, |
894 |
|
|
|
895 |
|
|
{"description": "<span =x\"=\"x>", |
896 |
|
|
"input": "<span =x\"=\"x>", |
897 |
|
|
"output": ["ParseError", "ParseError", "ParseError", |
898 |
|
|
["StartTag", "span", {"=x\"": "x>"}]]}, |
899 |
|
|
|
900 |
|
|
{"description": "<span =x\"=\"x\">", |
901 |
|
|
"input": "<span =x\"=\"x\">", |
902 |
|
|
"output": ["ParseError", "ParseError", ["StartTag", "span", {"=x\"": "x"}]]}, |
903 |
|
|
|
904 |
wakaba |
1.25 |
{"description": "bad attribute name (HTML5 revision 2123), '", |
905 |
|
|
"input": "<foo bar '>", |
906 |
|
|
"output": ["ParseError", ["StartTag", "foo", {"bar": "", "'": ""}]]}, |
907 |
|
|
|
908 |
|
|
{"description": "bad attribute name (HTML5 revision 2123), \"", |
909 |
|
|
"input": "<foo bar \">", |
910 |
|
|
"output": ["ParseError", ["StartTag", "foo", {"bar": "", "\"": ""}]]}, |
911 |
|
|
|
912 |
|
|
{"description": "bad attribute name (HTML5 revision 2123), 'x", |
913 |
|
|
"input": "<foo bar 'x>", |
914 |
|
|
"output": ["ParseError", ["StartTag", "foo", {"bar": "", "'x": ""}]]}, |
915 |
|
|
|
916 |
|
|
{"description": "bad attribute name (HTML5 revision 2123), \"x", |
917 |
|
|
"input": "<foo bar \"x>", |
918 |
|
|
"output": ["ParseError", ["StartTag", "foo", {"bar": "", "\"x": ""}]]}, |
919 |
|
|
|
920 |
|
|
{"description": "empty unquoted attribute value (HTML5 revision 2122)", |
921 |
|
|
"input": "<foo bar=>", |
922 |
|
|
"output": ["ParseError", ["StartTag", "foo", {"bar": ""}]]}, |
923 |
|
|
|
924 |
|
|
{"description": "empty unquoted attribute value (HTML5 revision 2122)", |
925 |
|
|
"input": "</foo bar=>", |
926 |
|
|
"output": ["ParseError", "ParseError", ["EndTag", "foo"]]}, |
927 |
|
|
|
928 |
|
|
{"description": "empty unquoted attribute value followed by another attr", |
929 |
|
|
"input": "<foo bar= baz=>", |
930 |
|
|
"output": ["ParseError", ["StartTag", "foo", {"bar": "baz="}]]}, |
931 |
|
|
|
932 |
wakaba |
1.19 |
{"description":"&\"", |
933 |
|
|
"input": "&\"", |
934 |
|
|
"output": ["ParseError", ["Character", "&\""]]}, |
935 |
|
|
|
936 |
|
|
{"description":"&'", |
937 |
|
|
"input": "&'", |
938 |
|
|
"output": ["ParseError", ["Character", "&'"]]}, |
939 |
|
|
|
940 |
|
|
{"description":"<a href=\"&\">", |
941 |
|
|
"input": "<a href=\"&\">", |
942 |
|
|
"output": [["StartTag", "a", {"href": "&"}]]}, |
943 |
|
|
|
944 |
|
|
{"description":"<a href=\"&'\">", |
945 |
|
|
"input": "<a href=\"&'\">", |
946 |
|
|
"output": ["ParseError", ["StartTag", "a", {"href": "&'"}]]}, |
947 |
|
|
|
948 |
|
|
{"description":"<a href='&'>", |
949 |
|
|
"input": "<a href='&'>", |
950 |
|
|
"output": [["StartTag", "a", {"href": "&"}]]}, |
951 |
|
|
|
952 |
|
|
{"description":"<a href='&\"'>", |
953 |
|
|
"input": "<a href='&\"'>", |
954 |
|
|
"output": ["ParseError", ["StartTag", "a", {"href": "&\""}]]}, |
955 |
|
|
|
956 |
|
|
{"description":"<a href=&\">", |
957 |
|
|
"input": "<a href=&\">", |
958 |
|
|
"output": ["ParseError", "ParseError", ["StartTag", "a", {"href": "&\""}]]}, |
959 |
|
|
|
960 |
|
|
{"description":"<a href=&'>", |
961 |
|
|
"input": "<a href=&'>", |
962 |
|
|
"output": ["ParseError", "ParseError", ["StartTag", "a", {"href": "&'"}]]}, |
963 |
|
|
|
964 |
|
|
{"description": "<!->-->", |
965 |
|
|
"input": "<!->-->", |
966 |
|
|
"output": ["ParseError", ["Comment", "-"], ["Character", "-->"]]}, |
967 |
|
|
|
968 |
|
|
{"description": "<!!--->-->", |
969 |
|
|
"input": "<!!--->-->", |
970 |
|
|
"output": ["ParseError", ["Comment", "!---"], ["Character", "-->"]]}, |
971 |
|
|
|
972 |
|
|
{"description": "<a href=''rel=''>", |
973 |
|
|
"input": "<a href=''rel=''>", |
974 |
|
|
"output": ["ParseError", ["StartTag", "a", {"href": "", "rel": ""}]]}, |
975 |
|
|
|
976 |
|
|
{"description": "<a href=\"\"rel=''>", |
977 |
|
|
"input": "<a href=\"\"rel=''>", |
978 |
|
|
"output": ["ParseError", ["StartTag", "a", {"href": "", "rel": ""}]]}, |
979 |
|
|
|
980 |
|
|
{"description": "<a href=''/rel=''>", |
981 |
|
|
"input": "<a href=''/rel=''>", |
982 |
|
|
"output": ["ParseError", ["StartTag", "a", {"href": "", "rel": ""}]]}, |
983 |
|
|
|
984 |
|
|
{"description": "<a href=''rel=''/>", |
985 |
|
|
"input": "<a href=''rel=''/>", |
986 |
wakaba |
1.24 |
"output": ["ParseError", |
987 |
|
|
["StartTag", "a", {"href": "", "rel": ""}, true]]}, |
988 |
wakaba |
1.19 |
|
989 |
|
|
{"description": "<link href=''rel=''/>", |
990 |
|
|
"input": "<link href=''rel=''/>", |
991 |
wakaba |
1.24 |
"output": ["ParseError", ["StartTag", "link", {"href": "", "rel": ""}, true]]}, |
992 |
wakaba |
1.19 |
|
993 |
wakaba |
1.21 |
{"description": "permitted slash after a space", |
994 |
|
|
"input": "<br />", |
995 |
wakaba |
1.24 |
"output": [["StartTag", "br", {}, true]]}, |
996 |
wakaba |
1.21 |
|
997 |
|
|
{"description": "slash in tag after a space", |
998 |
|
|
"input": "<br / >", |
999 |
|
|
"output": ["ParseError", ["StartTag", "br", {}]]}, |
1000 |
|
|
|
1001 |
|
|
{"description": "non-permitted slash after a space", |
1002 |
|
|
"input": "<b />", |
1003 |
wakaba |
1.24 |
"output": [["StartTag", "b", {}, true]]}, |
1004 |
wakaba |
1.21 |
|
1005 |
|
|
{"description": "end tag (non-)permitted slash after a space", |
1006 |
|
|
"input": "</br />", |
1007 |
|
|
"output": ["ParseError", ["EndTag", "br"]]}, |
1008 |
|
|
|
1009 |
|
|
{"description": "permitted slash after attribute name", |
1010 |
|
|
"input": "<br class/>", |
1011 |
wakaba |
1.24 |
"output": [["StartTag", "br", {"class": ""}, true]]}, |
1012 |
wakaba |
1.21 |
|
1013 |
|
|
{"description": "slash in tag after attribute name", |
1014 |
|
|
"input": "<br class/ >", |
1015 |
|
|
"output": ["ParseError", ["StartTag", "br", {"class": ""}]]}, |
1016 |
|
|
|
1017 |
|
|
{"description": "non permitted slash after attribute name", |
1018 |
|
|
"input": "<b class/>", |
1019 |
wakaba |
1.24 |
"output": [["StartTag", "b", {"class": ""}, true]]}, |
1020 |
wakaba |
1.21 |
|
1021 |
|
|
{"description": "end tag (non-)permitted slash after attribute name", |
1022 |
|
|
"input": "</br class/>", |
1023 |
|
|
"output": ["ParseError", "ParseError", ["EndTag", "br"]]}, |
1024 |
|
|
|
1025 |
|
|
{"description": "permitted slash in after attribute name state", |
1026 |
|
|
"input": "<br class />", |
1027 |
wakaba |
1.24 |
"output": [["StartTag", "br", {"class": ""}, true]]}, |
1028 |
wakaba |
1.21 |
|
1029 |
|
|
{"description": "non permitted slash in after attribute name state", |
1030 |
|
|
"input": "<b class />", |
1031 |
wakaba |
1.24 |
"output": [["StartTag", "b", {"class": ""}, true]]}, |
1032 |
wakaba |
1.21 |
|
1033 |
|
|
{"description": "end tag (non-)permitted slash in after attribute name state", |
1034 |
|
|
"input": "</br class />", |
1035 |
|
|
"output": ["ParseError", "ParseError", ["EndTag", "br"]]}, |
1036 |
|
|
|
1037 |
wakaba |
1.19 |
{"description": "<a \">", |
1038 |
|
|
"input": "<a \">", |
1039 |
|
|
"output": ["ParseError", ["StartTag", "a", {"\"": ""}]]}, |
1040 |
|
|
|
1041 |
|
|
{"description": "<a \"\">", |
1042 |
|
|
"input": "<a \"\">", |
1043 |
|
|
"output": ["ParseError", "ParseError", ["StartTag", "a", {"\"\"": ""}]]}, |
1044 |
|
|
|
1045 |
|
|
{"description": "<a '>", |
1046 |
|
|
"input": "<a '>", |
1047 |
|
|
"output": ["ParseError", ["StartTag", "a", {"'": ""}]]}, |
1048 |
|
|
|
1049 |
|
|
{"description": "<a ''>", |
1050 |
|
|
"input": "<a ''>", |
1051 |
|
|
"output": ["ParseError", "ParseError", ["StartTag", "a", {"''": ""}]]}, |
1052 |
|
|
|
1053 |
|
|
{"description": "<a a\">", |
1054 |
|
|
"input": "<a a\">", |
1055 |
|
|
"output": ["ParseError", ["StartTag", "a", {"a\"": ""}]]}, |
1056 |
|
|
|
1057 |
|
|
{"description": "<a a'>", |
1058 |
|
|
"input": "<a a'>", |
1059 |
|
|
"output": ["ParseError", ["StartTag", "a", {"a'": ""}]]}, |
1060 |
|
|
|
1061 |
|
|
{"description": "<a a\"'>", |
1062 |
|
|
"input": "<a a\"'>", |
1063 |
|
|
"output": ["ParseError", "ParseError", ["StartTag", "a", {"a\"'": ""}]]}, |
1064 |
|
|
|
1065 |
|
|
{"description": "<a a=\">", |
1066 |
|
|
"input": "<a a=\">", |
1067 |
|
|
"output": ["ParseError", ["StartTag", "a", {"a": ">"}]]}, |
1068 |
|
|
|
1069 |
|
|
{"description": "<a a='>", |
1070 |
|
|
"input": "<a a='>", |
1071 |
|
|
"output": ["ParseError", ["StartTag", "a", {"a": ">"}]]}, |
1072 |
|
|
|
1073 |
|
|
{"description": "<a a=a\">", |
1074 |
|
|
"input": "<a a=a\">", |
1075 |
|
|
"output": ["ParseError", ["StartTag", "a", {"a": "a\""}]]}, |
1076 |
|
|
|
1077 |
|
|
{"description": "<a a=a'>", |
1078 |
|
|
"input": "<a a=a'>", |
1079 |
|
|
"output": ["ParseError", ["StartTag", "a", {"a": "a'"}]]}, |
1080 |
|
|
|
1081 |
|
|
{"description": "<a a=>", |
1082 |
|
|
"input": "<a a=>", |
1083 |
wakaba |
1.25 |
"output": ["ParseError", ["StartTag", "a", {"a": ""}]]}, |
1084 |
wakaba |
1.21 |
|
1085 |
|
|
{"description": "end tag attribute (before attribute, >)", |
1086 |
|
|
"input": "</p class=\"\" >", |
1087 |
|
|
"output": ["ParseError", ["EndTag", "p"]]}, |
1088 |
|
|
|
1089 |
|
|
{"description": "end tag attribute (before attribute, EOF)", |
1090 |
|
|
"input": "</p class=\"\" ", |
1091 |
|
|
"output": ["ParseError", "ParseError", ["EndTag", "p"]]}, |
1092 |
|
|
|
1093 |
|
|
{"description": "end tag not closed (before attribute)", |
1094 |
|
|
"input": "</p >", |
1095 |
|
|
"output": [["EndTag", "p"]]}, |
1096 |
|
|
|
1097 |
|
|
{"description": "end tag not closed (attribute name)", |
1098 |
|
|
"input": "</p class", |
1099 |
|
|
"output": ["ParseError", "ParseError", ["EndTag", "p"]]}, |
1100 |
|
|
|
1101 |
|
|
{"description": "end tag attribute (after attribute name)", |
1102 |
|
|
"input": "</p class >", |
1103 |
|
|
"output": ["ParseError", ["EndTag", "p"]]}, |
1104 |
|
|
|
1105 |
|
|
{"description": "end tag attributes uc (after attribute name)", |
1106 |
|
|
"input": "</p class Title>", |
1107 |
|
|
"output": ["ParseError", ["EndTag", "p"]]}, |
1108 |
|
|
|
1109 |
|
|
{"description": "end tag attributes lc (after attribute name)", |
1110 |
|
|
"input": "</p class title>", |
1111 |
|
|
"output": ["ParseError", ["EndTag", "p"]]}, |
1112 |
|
|
|
1113 |
|
|
{"description": "end tag not closed (after attribute name)", |
1114 |
|
|
"input": "</p class ", |
1115 |
|
|
"output": ["ParseError", "ParseError", ["EndTag", "p"]]}, |
1116 |
|
|
|
1117 |
|
|
{"description": "end tag attribute (before attribute value)", |
1118 |
|
|
"input": "</p class=>", |
1119 |
wakaba |
1.25 |
"output": ["ParseError", "ParseError", ["EndTag", "p"]]}, |
1120 |
wakaba |
1.21 |
|
1121 |
|
|
{"description": "end tag not closed (before attribute value)", |
1122 |
|
|
"input": "</p class=", |
1123 |
|
|
"output": ["ParseError", "ParseError", ["EndTag", "p"]]}, |
1124 |
|
|
|
1125 |
|
|
{"description": "end tag not closed (attribute value double quote)", |
1126 |
|
|
"input": "</p class=\"", |
1127 |
|
|
"output": ["ParseError", "ParseError", ["EndTag", "p"]]}, |
1128 |
|
|
|
1129 |
|
|
{"description": "end tag not closed (attribute value single quote)", |
1130 |
|
|
"input": "</p class='", |
1131 |
|
|
"output": ["ParseError", "ParseError", ["EndTag", "p"]]}, |
1132 |
|
|
|
1133 |
|
|
{"description": "end tag attribute (attribute value unquoted)", |
1134 |
|
|
"input": "</p class=a>", |
1135 |
|
|
"output": ["ParseError", ["EndTag", "p"]]}, |
1136 |
|
|
|
1137 |
|
|
{"description": "end tag not closed (attribute value unquoted)", |
1138 |
|
|
"input": "</p class=a", |
1139 |
|
|
"output": ["ParseError", "ParseError", ["EndTag", "p"]]}, |
1140 |
|
|
|
1141 |
|
|
{"description": "end tag attribute (after attribute value double quoted)", |
1142 |
|
|
"input": "</p class=\"a\" >", |
1143 |
|
|
"output": ["ParseError", ["EndTag", "p"]]}, |
1144 |
|
|
|
1145 |
|
|
{"description": "end tag attribute (after attribute value single quoted)", |
1146 |
|
|
"input": "</p class='a' >", |
1147 |
|
|
"output": ["ParseError", ["EndTag", "p"]]}, |
1148 |
|
|
|
1149 |
|
|
{"description": "end tag not closed (after attribute value double quoted)", |
1150 |
|
|
"input": "</p class=\"a\" ", |
1151 |
|
|
"output": ["ParseError", "ParseError", ["EndTag", "p"]]}, |
1152 |
|
|
|
1153 |
|
|
{"description": "end tag not closed (after attribute value single quoted)", |
1154 |
|
|
"input": "</p class='a' ", |
1155 |
wakaba |
1.23 |
"output": ["ParseError", "ParseError", ["EndTag", "p"]]}, |
1156 |
|
|
|
1157 |
|
|
{"description": "start tag not closed (after attribute value (quoted))", |
1158 |
|
|
"input": "<p class='a'", |
1159 |
|
|
"output": ["ParseError", ["StartTag", "p", {"class": "a"}]]}, |
1160 |
|
|
|
1161 |
|
|
{"description": "end tag not closed (after attribute value (quoted))", |
1162 |
|
|
"input": "</p class='a'", |
1163 |
|
|
"output": ["ParseError", "ParseError", ["EndTag", "p"]]}, |
1164 |
|
|
|
1165 |
|
|
{"description": "start tag not closed (self-closing start tag)", |
1166 |
|
|
"input": "<p class='a'/", |
1167 |
|
|
"output": ["ParseError", ["StartTag", "p", {"class": "a"}]]}, |
1168 |
|
|
|
1169 |
|
|
{"description": "end tag not closed (self-closing start tag)", |
1170 |
|
|
"input": "</p/", |
1171 |
|
|
"output": ["ParseError", ["EndTag", "p"]]}, |
1172 |
|
|
|
1173 |
|
|
{"description": "end tag not closed (self-closing start tag)", |
1174 |
|
|
"input": "</p class='a'/", |
1175 |
wakaba |
1.21 |
"output": ["ParseError", "ParseError", ["EndTag", "p"]]} |
1176 |
wakaba |
1.23 |
|
1177 |
|
|
|
1178 |
wakaba |
1.4 |
|
1179 |
|
|
]} |