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 |
|
|
{"description":"PUBLIC\u0022\u0022", |
92 |
|
|
"input":"<!DOCTYPE html PUBLIC\u0022\u0022>", |
93 |
|
|
"output":[["DOCTYPE", "html", "", null, true]]}, |
94 |
|
|
|
95 |
|
|
{"description":"PUBLIC''", |
96 |
|
|
"input":"<!DOCTYPE html PUBLIC''>", |
97 |
|
|
"output":[["DOCTYPE", "html", "", null, true]]}, |
98 |
|
|
|
99 |
|
|
{"description":"PUBLICbogus", |
100 |
|
|
"input":"<!DOCTYPE html PUBLICbogus>", |
101 |
|
|
"output":["ParseError",["DOCTYPE", "html", null, null, false]]}, |
102 |
|
|
|
103 |
|
|
{"description":"PUBLIC bogus", |
104 |
|
|
"input":"<!DOCTYPE html PUBLIC bogus>", |
105 |
|
|
"output":["ParseError",["DOCTYPE", "html", null, null, false]]}, |
106 |
|
|
|
107 |
|
|
{"description":"PUBLIC \u0022\u0022bogus", |
108 |
|
|
"input":"<!DOCTYPE html PUBLIC \u0022\u0022bogus>", |
109 |
|
|
"output":["ParseError",["DOCTYPE", "html", "", null, false]]}, |
110 |
|
|
|
111 |
|
|
{"description":"PUBLIC \u0022\u0022 bogus", |
112 |
|
|
"input":"<!DOCTYPE html PUBLIC \u0022\u0022 bogus>", |
113 |
|
|
"output":["ParseError",["DOCTYPE", "html", "", null, false]]}, |
114 |
|
|
|
115 |
|
|
{"description":"PUBLIC \u0022\u0022 \u0022\u0022bogus", |
116 |
|
|
"input":"<!DOCTYPE html PUBLIC \u0022\u0022 \u0022\u0022bogus>", |
117 |
|
|
"output":["ParseError",["DOCTYPE", "html", "", "", false]]}, |
118 |
|
|
|
119 |
|
|
{"description":"PUBLIC \u0022\u0022 \u0022\u0022 bogus", |
120 |
|
|
"input":"<!DOCTYPE html PUBLIC \u0022\u0022 \u0022\u0022 bogus>", |
121 |
|
|
"output":["ParseError",["DOCTYPE", "html", "", "", false]]}, |
122 |
|
|
|
123 |
|
|
{"description":"PUBLIC \u0022\u0022\u0022\u0022>", |
124 |
|
|
"input":"<!DOCTYPE html PUBLIC \u0022\u0022\u0022\u0022>", |
125 |
|
|
"output":[["DOCTYPE", "html", "", "", true]]}, |
126 |
|
|
|
127 |
|
|
{"description":"PUBLIC \u0022\u0022''>", |
128 |
|
|
"input":"<!DOCTYPE html PUBLIC \u0022\u0022''>", |
129 |
|
|
"output":[["DOCTYPE", "html", "", "", true]]}, |
130 |
wakaba |
1.3 |
|
131 |
wakaba |
1.13 |
{"description":"SYSTEM a", |
132 |
|
|
"input":"<!DOCTYPE html SYSTEM a>", |
133 |
|
|
"output":["ParseError", ["DOCTYPE", "html", null, null, false]]}, |
134 |
|
|
|
135 |
wakaba |
1.14 |
{"description":"<!---x-->", |
136 |
|
|
"input":"<!---x-->", |
137 |
|
|
"output":[["Comment", "-x"]]}, |
138 |
|
|
|
139 |
|
|
{"description":"<!----x-->", |
140 |
|
|
"input":"<!----x-->", |
141 |
|
|
"output":["ParseError", ["Comment", "--x"]]}, |
142 |
|
|
|
143 |
wakaba |
1.1 |
{"description":"non-PCDATA content model flag, start tag-like string", |
144 |
|
|
"contentModelFlags":["PLAINTEXT","RCDATA","CDATA"], |
145 |
|
|
"input":"<div>", |
146 |
wakaba |
1.2 |
"output":[["Character", "<div>"]]}, |
147 |
|
|
|
148 |
|
|
{"description":"end tag followed by character data", |
149 |
|
|
"contentModelFlags":["RCDATA","CDATA"], |
150 |
|
|
"lastStartTag":"xxx", |
151 |
|
|
"input":"AB</xxx>CD", |
152 |
wakaba |
1.4 |
"output":[["Character", "AB"],["EndTag", "xxx"],["Character", "CD"]]}, |
153 |
wakaba |
1.1 |
|
154 |
wakaba |
1.12 |
{"description":"NULL character reference", |
155 |
|
|
"input":"�", |
156 |
|
|
"output":["ParseError", ["Character", "\uFFFD"]]}, |
157 |
|
|
|
158 |
|
|
{"description":"NULL character reference", |
159 |
|
|
"input":"�", |
160 |
|
|
"output":["ParseError", ["Character", "\uFFFD"]]}, |
161 |
|
|
|
162 |
|
|
{"description":"character entity ", |
163 |
|
|
"input":" ", |
164 |
|
|
"output":["ParseError", ["Character", "\u000A"]]}, |
165 |
|
|
|
166 |
|
|
{"description":"character entity 
", |
167 |
|
|
"input":"
", |
168 |
|
|
"output":["ParseError", ["Character", "\u000A"]]}, |
169 |
|
|
|
170 |
|
|
{"description":"character entities ", |
171 |
|
|
"input":" ", |
172 |
|
|
"output":["ParseError", ["Character", "\u000A\u000A"]]}, |
173 |
|
|
|
174 |
|
|
{"description":"character entity followed by a LF", |
175 |
|
|
"input":" \u000A", |
176 |
|
|
"output":["ParseError", ["Character", "\u000A\u000A"]]}, |
177 |
|
|
|
178 |
wakaba |
1.4 |
{"description":"c1 character references", |
179 |
|
|
"input":"€‚ƒ„…†‡", |
180 |
|
|
"output":[ |
181 |
|
|
"ParseError", ["Character", "\u20AC"], |
182 |
|
|
"ParseError", ["Character", "\uFFFD"], |
183 |
|
|
"ParseError", ["Character", "\u201A"], |
184 |
|
|
"ParseError", ["Character", "\u0192"], |
185 |
|
|
"ParseError", ["Character", "\u201E"], |
186 |
|
|
"ParseError", ["Character", "\u2026"], |
187 |
|
|
"ParseError", ["Character", "\u2020"], |
188 |
|
|
"ParseError", ["Character", "\u2021"] |
189 |
|
|
]}, |
190 |
|
|
{"description":"c1 character references", |
191 |
|
|
"input":"ˆ‰Š‹ŒŽ", |
192 |
|
|
"output":[ |
193 |
|
|
"ParseError", ["Character", "\u02C6"], |
194 |
|
|
"ParseError", ["Character", "\u2030"], |
195 |
|
|
"ParseError", ["Character", "\u0160"], |
196 |
|
|
"ParseError", ["Character", "\u2039"], |
197 |
|
|
"ParseError", ["Character", "\u0152"], |
198 |
|
|
"ParseError", ["Character", "\uFFFD"], |
199 |
|
|
"ParseError", ["Character", "\u017D"], |
200 |
|
|
"ParseError", ["Character", "\uFFFD"] |
201 |
|
|
]}, |
202 |
|
|
{"description":"c1 character references", |
203 |
|
|
"input":"‘’“”•–—", |
204 |
|
|
"output":[ |
205 |
|
|
"ParseError", ["Character", "\uFFFD"], |
206 |
|
|
"ParseError", ["Character", "\u2018"], |
207 |
|
|
"ParseError", ["Character", "\u2019"], |
208 |
|
|
"ParseError", ["Character", "\u201C"], |
209 |
|
|
"ParseError", ["Character", "\u201D"], |
210 |
|
|
"ParseError", ["Character", "\u2022"], |
211 |
|
|
"ParseError", ["Character", "\u2013"], |
212 |
|
|
"ParseError", ["Character", "\u2014"] |
213 |
|
|
]}, |
214 |
|
|
{"description":"c1 character references", |
215 |
|
|
"input":"˜™š›œžŸ", |
216 |
|
|
"output":[ |
217 |
|
|
"ParseError", ["Character", "\u02DC"], |
218 |
|
|
"ParseError", ["Character", "\u2122"], |
219 |
|
|
"ParseError", ["Character", "\u0161"], |
220 |
|
|
"ParseError", ["Character", "\u203A"], |
221 |
|
|
"ParseError", ["Character", "\u0153"], |
222 |
|
|
"ParseError", ["Character", "\uFFFD"], |
223 |
|
|
"ParseError", ["Character", "\u017E"], |
224 |
|
|
"ParseError", ["Character", "\u0178"] |
225 |
|
|
]}, |
226 |
|
|
|
227 |
|
|
{"description":"c1 character references", |
228 |
|
|
"input":"€‚ƒ„…†‡", |
229 |
|
|
"output":[ |
230 |
|
|
"ParseError", ["Character", "\u20AC"], |
231 |
|
|
"ParseError", ["Character", "\uFFFD"], |
232 |
|
|
"ParseError", ["Character", "\u201A"], |
233 |
|
|
"ParseError", ["Character", "\u0192"], |
234 |
|
|
"ParseError", ["Character", "\u201E"], |
235 |
|
|
"ParseError", ["Character", "\u2026"], |
236 |
|
|
"ParseError", ["Character", "\u2020"], |
237 |
|
|
"ParseError", ["Character", "\u2021"] |
238 |
|
|
]}, |
239 |
|
|
{"description":"c1 character references", |
240 |
|
|
"input":"ˆ‰Š‹ŒŽ", |
241 |
|
|
"output":[ |
242 |
|
|
"ParseError", ["Character", "\u02C6"], |
243 |
|
|
"ParseError", ["Character", "\u2030"], |
244 |
|
|
"ParseError", ["Character", "\u0160"], |
245 |
|
|
"ParseError", ["Character", "\u2039"], |
246 |
|
|
"ParseError", ["Character", "\u0152"], |
247 |
|
|
"ParseError", ["Character", "\uFFFD"], |
248 |
|
|
"ParseError", ["Character", "\u017D"], |
249 |
|
|
"ParseError", ["Character", "\uFFFD"] |
250 |
|
|
]}, |
251 |
|
|
{"description":"c1 character references", |
252 |
|
|
"input":"‘’“”•–—", |
253 |
|
|
"output":[ |
254 |
|
|
"ParseError", ["Character", "\uFFFD"], |
255 |
|
|
"ParseError", ["Character", "\u2018"], |
256 |
|
|
"ParseError", ["Character", "\u2019"], |
257 |
|
|
"ParseError", ["Character", "\u201C"], |
258 |
|
|
"ParseError", ["Character", "\u201D"], |
259 |
|
|
"ParseError", ["Character", "\u2022"], |
260 |
|
|
"ParseError", ["Character", "\u2013"], |
261 |
|
|
"ParseError", ["Character", "\u2014"] |
262 |
|
|
]}, |
263 |
|
|
{"description":"c1 character references", |
264 |
|
|
"input":"˜™š›œžŸ", |
265 |
|
|
"output":[ |
266 |
|
|
"ParseError", ["Character", "\u02DC"], |
267 |
|
|
"ParseError", ["Character", "\u2122"], |
268 |
|
|
"ParseError", ["Character", "\u0161"], |
269 |
|
|
"ParseError", ["Character", "\u203A"], |
270 |
|
|
"ParseError", ["Character", "\u0153"], |
271 |
|
|
"ParseError", ["Character", "\uFFFD"], |
272 |
|
|
"ParseError", ["Character", "\u017E"], |
273 |
|
|
"ParseError", ["Character", "\u0178"] |
274 |
wakaba |
1.5 |
]}, |
275 |
|
|
|
276 |
wakaba |
1.16 |
{"description":"Numeric entity representing a Windows-1252 'codepoint'", |
277 |
|
|
"input":"‰", |
278 |
|
|
"output":["ParseError", ["Character", "\u2030"]]}, |
279 |
|
|
|
280 |
|
|
{"description":"Hexadecimal entity representing a Windows-1252 'codepoint'", |
281 |
|
|
"input":"‰", |
282 |
|
|
"output":["ParseError", ["Character", "\u2030"]]}, |
283 |
|
|
|
284 |
wakaba |
1.12 |
{"description":"surrogate character reference", |
285 |
|
|
"input":"�", |
286 |
|
|
"output":["ParseError", ["Character", "\uFFFD"]]}, |
287 |
|
|
|
288 |
|
|
{"description":"surrogate character references", |
289 |
|
|
"input":"��", |
290 |
|
|
"output":["ParseError", ["Character", "\uFFFD"], |
291 |
|
|
"ParseError", ["Character", "\uFFFD"]]}, |
292 |
|
|
|
293 |
|
|
{"description":"surrogate character reference", |
294 |
|
|
"input":"\uD800�", |
295 |
|
|
"output":[["Character", "\uD800"], |
296 |
|
|
"ParseError", ["Character", "\uFFFD"]]}, |
297 |
|
|
|
298 |
|
|
{"description":"surrogate character reference", |
299 |
|
|
"input":"�\uDFFF", |
300 |
|
|
"output":["ParseError", ["Character", "\uFFFD\uDFFF"]]}, |
301 |
|
|
|
302 |
|
|
{"description":"surrogate character reference", |
303 |
|
|
"input":"�", |
304 |
|
|
"output":["ParseError", ["Character", "\uFFFD"]]}, |
305 |
|
|
|
306 |
|
|
{"description":"surrogate character reference", |
307 |
|
|
"input":"�", |
308 |
|
|
"output":["ParseError", ["Character", "\uFFFD"]]}, |
309 |
|
|
|
310 |
|
|
{"description":"non-Unicode character reference", |
311 |
|
|
"input":"�", |
312 |
|
|
"output":["ParseError", ["Character", "\uFFFD"]]}, |
313 |
|
|
|
314 |
|
|
{"description":"non-Unicode character reference", |
315 |
|
|
"input":"�", |
316 |
|
|
"output":["ParseError", ["Character", "\uFFFD"]]}, |
317 |
|
|
|
318 |
wakaba |
1.15 |
{"description":"Broken hcro (&#x)", |
319 |
|
|
"input":"&#x", |
320 |
|
|
"output":["ParseError", ["Character", "&#x"]]}, |
321 |
|
|
|
322 |
|
|
{"description":"Broken hcro (&#X)", |
323 |
|
|
"input":"&#X", |
324 |
|
|
"output":["ParseError", ["Character", "&#X"]]}, |
325 |
|
|
|
326 |
|
|
{"description":"Broken hcro (&#x;)", |
327 |
|
|
"input":"&#x;", |
328 |
|
|
"output":["ParseError", ["Character", "&#x;"]]}, |
329 |
|
|
|
330 |
|
|
{"description":"Broken hcro (&#X;)", |
331 |
|
|
"input":"&#X;", |
332 |
|
|
"output":["ParseError", ["Character", "&#X;"]]}, |
333 |
|
|
|
334 |
|
|
{"description":"Broken hcro (&#xg)", |
335 |
|
|
"input":"&#xg", |
336 |
|
|
"output":["ParseError", ["Character", "&#xg"]]}, |
337 |
|
|
|
338 |
|
|
{"description":"Broken hcro (&#Xg)", |
339 |
|
|
"input":"&#Xg", |
340 |
|
|
"output":["ParseError", ["Character", "&#Xg"]]}, |
341 |
|
|
|
342 |
|
|
{"description":"Broken hcro (&#xg;)", |
343 |
|
|
"input":"&#xg;", |
344 |
|
|
"output":["ParseError", ["Character", "&#xg;"]]}, |
345 |
|
|
|
346 |
|
|
{"description":"Broken hcro (&#Xg;)", |
347 |
|
|
"input":"&#Xg;", |
348 |
|
|
"output":["ParseError", ["Character", "&#Xg;"]]}, |
349 |
|
|
|
350 |
|
|
{"description":"Broken hcro (&#x!)", |
351 |
|
|
"input":"&#x!", |
352 |
|
|
"output":["ParseError", ["Character", "&#x!"]]}, |
353 |
|
|
|
354 |
|
|
{"description":"Broken hcro (&#X!)", |
355 |
|
|
"input":"&#X!", |
356 |
|
|
"output":["ParseError", ["Character", "&#X!"]]}, |
357 |
|
|
|
358 |
wakaba |
1.5 |
{"description":"NULL character", |
359 |
|
|
"input":"\u0000", |
360 |
wakaba |
1.6 |
"output":["ParseError",["Character", "\uFFFD"]]}, |
361 |
|
|
|
362 |
|
|
{"description":"™", |
363 |
|
|
"input":"™", |
364 |
wakaba |
1.7 |
"output":[["Character", "\u2122"]]}, |
365 |
|
|
|
366 |
|
|
{"description":"⟨", |
367 |
|
|
"input":"⟨", |
368 |
wakaba |
1.18 |
"output":[["Character", "\u27E8"]]}, |
369 |
wakaba |
1.7 |
|
370 |
|
|
{"description":"⟩", |
371 |
|
|
"input":"⟩", |
372 |
wakaba |
1.18 |
"output":[["Character", "\u27E9"]]}, |
373 |
wakaba |
1.7 |
|
374 |
|
|
{"description":"&;", |
375 |
|
|
"input":"&;", |
376 |
wakaba |
1.8 |
"output":[["Character", "&;"]]}, |
377 |
|
|
|
378 |
wakaba |
1.11 |
{"description":"&HT", |
379 |
|
|
"input":"&\u0009", |
380 |
|
|
"output":[["Character", "&\u0009"]]}, |
381 |
|
|
|
382 |
|
|
{"description":"&LF", |
383 |
|
|
"input":"&\u000A", |
384 |
|
|
"output":[["Character", "&\u000A"]]}, |
385 |
|
|
|
386 |
|
|
{"description":"&VT", |
387 |
|
|
"input":"&\u000B", |
388 |
|
|
"output":[["Character", "&\u000B"]]}, |
389 |
|
|
|
390 |
|
|
{"description":"&FF", |
391 |
|
|
"input":"&\u000C", |
392 |
|
|
"output":[["Character", "&\u000C"]]}, |
393 |
|
|
|
394 |
|
|
{"description":"&SP", |
395 |
|
|
"input":"& ", |
396 |
|
|
"output":[["Character", "& "]]}, |
397 |
|
|
|
398 |
|
|
{"description":"&<", |
399 |
|
|
"input":"&<", |
400 |
wakaba |
1.12 |
"output":[["Character", "&"], "ParseError", ["Character", "<"]]}, |
401 |
wakaba |
1.11 |
|
402 |
|
|
{"description":"&<p>", |
403 |
|
|
"input":"&<p>", |
404 |
|
|
"output":[["Character", "&"], ["StartTag", "p", {}]]}, |
405 |
|
|
|
406 |
|
|
{"description":"&&", |
407 |
|
|
"input":"&&", |
408 |
|
|
"output":[["Character", "&&"]]}, |
409 |
|
|
|
410 |
|
|
{"description":"&&", |
411 |
|
|
"input":"&&", |
412 |
|
|
"output":[["Character", "&&"]]}, |
413 |
|
|
|
414 |
|
|
{"description":"&", |
415 |
|
|
"input":"&", |
416 |
|
|
"output":[["Character", "&"]]}, |
417 |
wakaba |
1.12 |
|
418 |
|
|
{"description":"named character reference w/o refc", |
419 |
|
|
"input":"&abc", |
420 |
|
|
"output":["ParseError", ["Character", "&abc"]]}, |
421 |
|
|
|
422 |
|
|
{"description":"named character reference", |
423 |
|
|
"input":"&abc", |
424 |
|
|
"output":[["Character", "&abc"]]}, |
425 |
|
|
|
426 |
|
|
{"description":"named character reference w/o refc", |
427 |
|
|
"input":"&abc", |
428 |
|
|
"output":["ParseError", ["Character", "&abc"]]}, |
429 |
|
|
|
430 |
|
|
{"description":"unknown named character reference", |
431 |
|
|
"input":"&abc;", |
432 |
|
|
"output":["ParseError", ["Character", "&abc;"]]}, |
433 |
|
|
|
434 |
|
|
{"description":"named character reference w/o refc in attr", |
435 |
|
|
"input":"<a href='&abc'>", |
436 |
|
|
"output":["ParseError", ["StartTag", "a", {"href": "&abc"}]]}, |
437 |
|
|
|
438 |
|
|
{"description":"named character reference in attr", |
439 |
|
|
"input":"<a href='&abc'>", |
440 |
|
|
"output":[["StartTag", "a", {"href": "&abc"}]]}, |
441 |
|
|
|
442 |
|
|
{"description":"named character reference w/o refc in attr", |
443 |
|
|
"input":"<a href='&abc'>", |
444 |
|
|
"output":["ParseError", ["StartTag", "a", {"href": "&abc"}]]}, |
445 |
|
|
|
446 |
|
|
{"description":"unknown named character reference in attr", |
447 |
|
|
"input":"<a href='&abc;'>", |
448 |
|
|
"output":["ParseError", ["StartTag", "a", {"href": "&abc;"}]]}, |
449 |
wakaba |
1.15 |
|
450 |
|
|
{"description":"entity w/o refc at the end of unterminated attribute value", |
451 |
|
|
"input":"<a href='©", |
452 |
|
|
"output":["ParseError", "ParseError", ["StartTag", "a", {"href": "\u00A9"}]]}, |
453 |
|
|
|
454 |
|
|
{"description":"entity w/o refc at the end of attribute value", |
455 |
|
|
"input":"<a href='©'>", |
456 |
|
|
"output":["ParseError", ["StartTag", "a", {"href": "\u00A9"}]]}, |
457 |
|
|
|
458 |
|
|
{"description":"entity w/refc at the end of attribute value", |
459 |
|
|
"input":"<a href='©'>", |
460 |
|
|
"output":[["StartTag", "a", {"href": "\u00A9"}]]}, |
461 |
|
|
|
462 |
|
|
{"description":"entity w/o refc href='©!'", |
463 |
|
|
"input":"<a href='©!'>", |
464 |
|
|
"output":["ParseError", ["StartTag", "a", {"href": "\u00A9!"}]]}, |
465 |
|
|
|
466 |
|
|
{"description":"entity w/o refc href='©=ok'", |
467 |
|
|
"input":"<a href='©=ok'>", |
468 |
|
|
"output":["ParseError", ["StartTag", "a", {"href": "\u00A9=ok"}]]}, |
469 |
|
|
|
470 |
|
|
{"description":"entity w/o refc href='©right'", |
471 |
|
|
"input":"<a href='©right'>", |
472 |
|
|
"output":["ParseError", ["StartTag", "a", {"href": "©right"}]]}, |
473 |
|
|
|
474 |
|
|
{"description":"entity w/o refc href='©right;'", |
475 |
|
|
"input":"<a href='©right;'>", |
476 |
|
|
"output":["ParseError", ["StartTag", "a", {"href": "©right;"}]]}, |
477 |
|
|
|
478 |
|
|
{"description":"entity w/o refc href='©rightc'", |
479 |
|
|
"input":"<a href='©rightc'>", |
480 |
|
|
"output":["ParseError", ["StartTag", "a", {"href": "©rightc"}]]}, |
481 |
|
|
|
482 |
|
|
{"description":"entity w/o refc href='©rightcd'", |
483 |
|
|
"input":"<a href='©rightcd'>", |
484 |
|
|
"output":["ParseError", ["StartTag", "a", {"href": "©rightcd"}]]}, |
485 |
wakaba |
1.11 |
|
486 |
wakaba |
1.8 |
{"description":"cdata end tag containing <", |
487 |
|
|
"contentModelFlags":["RCDATA","CDATA"], |
488 |
|
|
"lastStartTag":"xxx", |
489 |
|
|
"input":"</xxx<div>", |
490 |
wakaba |
1.10 |
"output":[["Character", "</xxx<div>"]]}, |
491 |
wakaba |
1.8 |
|
492 |
|
|
{"description":"< in tag name state", |
493 |
|
|
"input":"<p<div>", |
494 |
|
|
"output":[["StartTag", "p<div", {}]]}, |
495 |
|
|
|
496 |
|
|
{"description":"< in before attribute name state", |
497 |
|
|
"input":"<p <div>", |
498 |
|
|
"output":[["StartTag", "p", {"<div":""}]]}, |
499 |
|
|
|
500 |
|
|
{"description":"< in attribute name state", |
501 |
|
|
"input":"<p align<div>", |
502 |
|
|
"output":[["StartTag", "p", {"align<div":""}]]}, |
503 |
|
|
|
504 |
|
|
{"description":"< in after attribute name state", |
505 |
|
|
"input":"<p align <div>", |
506 |
|
|
"output":[["StartTag", "p", {"align":"","<div":""}]]}, |
507 |
|
|
|
508 |
|
|
{"description":"< in before attribute value state", |
509 |
|
|
"input":"<p align=<div>", |
510 |
|
|
"output":[["StartTag", "p", {"align":"<div"}]]}, |
511 |
|
|
|
512 |
|
|
{"description":"< in attribute value (unquoted) state", |
513 |
|
|
"input":"<p align=left<div>", |
514 |
|
|
"output":[["StartTag", "p", {"align":"left<div"}]]}, |
515 |
|
|
|
516 |
|
|
{"description":"< in attribute value (single-unquoted) state", |
517 |
|
|
"input":"<p align='left<div>", |
518 |
|
|
"output":["ParseError", ["StartTag", "p", {"align":"left<div>"}]]}, |
519 |
|
|
|
520 |
|
|
{"description":"< in attribute value (double-unquoted) state", |
521 |
|
|
"input":"<p align=\u0022left<div>", |
522 |
wakaba |
1.17 |
"output":["ParseError", ["StartTag", "p", {"align":"left<div>"}]]}, |
523 |
|
|
|
524 |
|
|
{"description":"/''b=\"\"", |
525 |
|
|
"input": "<a /''b=\"\">", |
526 |
wakaba |
1.19 |
"output": ["ParseError", "ParseError", "ParseError", |
527 |
|
|
["StartTag", "a", {"''b": ""}]]}, |
528 |
wakaba |
1.17 |
|
529 |
|
|
{"description":"/\"\"b=\"\"", |
530 |
|
|
"input": "<a /\"\"b=\"\">", |
531 |
wakaba |
1.19 |
"output": ["ParseError", "ParseError", "ParseError", |
532 |
|
|
["StartTag", "a", {"\"\"b": ""}]]}, |
533 |
wakaba |
1.17 |
|
534 |
|
|
{"description":"\"b=\"\"", |
535 |
|
|
"input": "<a \"b=\"\">", |
536 |
wakaba |
1.19 |
"output": ["ParseError", ["StartTag", "a", {"\"b": ""}]]}, |
537 |
wakaba |
1.17 |
|
538 |
|
|
{"description":"\"\"b=\"\"", |
539 |
|
|
"input": "<a \"\"b=\"\">", |
540 |
wakaba |
1.19 |
"output": ["ParseError", "ParseError", ["StartTag", "a", {"\"\"b": ""}]]}, |
541 |
wakaba |
1.17 |
|
542 |
|
|
{"description":"'b=\"\"", |
543 |
|
|
"input": "<a 'b=\"\">", |
544 |
wakaba |
1.19 |
"output": ["ParseError", ["StartTag", "a", {"'b": ""}]]}, |
545 |
wakaba |
1.17 |
|
546 |
|
|
{"description":"''b=\"\"", |
547 |
|
|
"input": "<a ''b=\"\">", |
548 |
wakaba |
1.19 |
"output": ["ParseError", "ParseError", ["StartTag", "a", {"''b": ""}]]}, |
549 |
wakaba |
1.17 |
|
550 |
|
|
{"description":"/b=\"\"", |
551 |
|
|
"input": "<a /b=\"\">", |
552 |
|
|
"output": ["ParseError", ["StartTag", "a", {"b": ""}]]}, |
553 |
|
|
|
554 |
|
|
{"description":"b/=\"\"", |
555 |
|
|
"input": "<a b/=\"\">", |
556 |
wakaba |
1.19 |
"output": ["ParseError", "ParseError", "ParseError", "ParseError", |
557 |
|
|
["StartTag", "a", {"b": "", "=\"\"": ""}]]}, |
558 |
wakaba |
1.17 |
|
559 |
|
|
{"description":"b/c=\"\"", |
560 |
|
|
"input": "<a b/c=\"\">", |
561 |
|
|
"output": ["ParseError", ["StartTag", "a", {"b": "", "c": ""}]]}, |
562 |
|
|
|
563 |
|
|
{"description":"bc[NULL]=\"\"", |
564 |
|
|
"input": "<a bc\u0000=\"\">", |
565 |
|
|
"output": ["ParseError", ["StartTag", "a", {"bc\uFFFD": ""}]]}, |
566 |
|
|
|
567 |
|
|
{"description":"b[NULL]c=\"\"", |
568 |
|
|
"input": "<a b\u0000c=\"\">", |
569 |
|
|
"output": ["ParseError", ["StartTag", "a", {"b\uFFFDc": ""}]]}, |
570 |
|
|
|
571 |
|
|
{"description":"[NULL]bc=\"\"", |
572 |
|
|
"input": "<a \u0000bc=\"\">", |
573 |
wakaba |
1.19 |
"output": ["ParseError", ["StartTag", "a", {"\uFFFDbc": ""}]]}, |
574 |
|
|
|
575 |
|
|
{"description": "<span ===>", |
576 |
|
|
"input": "<span ===>", |
577 |
|
|
"output": ["ParseError", "ParseError", ["StartTag", "span", {"=": "="}]]}, |
578 |
|
|
|
579 |
|
|
{"description": "<span a==>", |
580 |
|
|
"input": "<span a==>", |
581 |
|
|
"output": ["ParseError", ["StartTag", "span", {"a": "="}]]}, |
582 |
|
|
|
583 |
|
|
{"description": "<span ==a>", |
584 |
|
|
"input": "<span ==a>", |
585 |
|
|
"output": ["ParseError", ["StartTag", "span", {"=": "a"}]]}, |
586 |
|
|
|
587 |
|
|
{"description": "<span a=b=>", |
588 |
|
|
"input": "<span a=b=>", |
589 |
|
|
"output": ["ParseError", ["StartTag", "span", {"a": "b="}]]}, |
590 |
|
|
|
591 |
|
|
{"description": "<span =x\"=\"x>", |
592 |
|
|
"input": "<span =x\"=\"x>", |
593 |
|
|
"output": ["ParseError", "ParseError", "ParseError", |
594 |
|
|
["StartTag", "span", {"=x\"": "x>"}]]}, |
595 |
|
|
|
596 |
|
|
{"description": "<span =x\"=\"x\">", |
597 |
|
|
"input": "<span =x\"=\"x\">", |
598 |
|
|
"output": ["ParseError", "ParseError", ["StartTag", "span", {"=x\"": "x"}]]}, |
599 |
|
|
|
600 |
|
|
{"description":"&\"", |
601 |
|
|
"input": "&\"", |
602 |
|
|
"output": ["ParseError", ["Character", "&\""]]}, |
603 |
|
|
|
604 |
|
|
{"description":"&'", |
605 |
|
|
"input": "&'", |
606 |
|
|
"output": ["ParseError", ["Character", "&'"]]}, |
607 |
|
|
|
608 |
|
|
{"description":"<a href=\"&\">", |
609 |
|
|
"input": "<a href=\"&\">", |
610 |
|
|
"output": [["StartTag", "a", {"href": "&"}]]}, |
611 |
|
|
|
612 |
|
|
{"description":"<a href=\"&'\">", |
613 |
|
|
"input": "<a href=\"&'\">", |
614 |
|
|
"output": ["ParseError", ["StartTag", "a", {"href": "&'"}]]}, |
615 |
|
|
|
616 |
|
|
{"description":"<a href='&'>", |
617 |
|
|
"input": "<a href='&'>", |
618 |
|
|
"output": [["StartTag", "a", {"href": "&"}]]}, |
619 |
|
|
|
620 |
|
|
{"description":"<a href='&\"'>", |
621 |
|
|
"input": "<a href='&\"'>", |
622 |
|
|
"output": ["ParseError", ["StartTag", "a", {"href": "&\""}]]}, |
623 |
|
|
|
624 |
|
|
{"description":"<a href=&\">", |
625 |
|
|
"input": "<a href=&\">", |
626 |
|
|
"output": ["ParseError", "ParseError", ["StartTag", "a", {"href": "&\""}]]}, |
627 |
|
|
|
628 |
|
|
{"description":"<a href=&'>", |
629 |
|
|
"input": "<a href=&'>", |
630 |
|
|
"output": ["ParseError", "ParseError", ["StartTag", "a", {"href": "&'"}]]}, |
631 |
|
|
|
632 |
|
|
{"description": "<!->-->", |
633 |
|
|
"input": "<!->-->", |
634 |
|
|
"output": ["ParseError", ["Comment", "-"], ["Character", "-->"]]}, |
635 |
|
|
|
636 |
|
|
{"description": "<!!--->-->", |
637 |
|
|
"input": "<!!--->-->", |
638 |
|
|
"output": ["ParseError", ["Comment", "!---"], ["Character", "-->"]]}, |
639 |
|
|
|
640 |
|
|
{"description": "<a href=''rel=''>", |
641 |
|
|
"input": "<a href=''rel=''>", |
642 |
|
|
"output": ["ParseError", ["StartTag", "a", {"href": "", "rel": ""}]]}, |
643 |
|
|
|
644 |
|
|
{"description": "<a href=\"\"rel=''>", |
645 |
|
|
"input": "<a href=\"\"rel=''>", |
646 |
|
|
"output": ["ParseError", ["StartTag", "a", {"href": "", "rel": ""}]]}, |
647 |
|
|
|
648 |
|
|
{"description": "<a href=''/rel=''>", |
649 |
|
|
"input": "<a href=''/rel=''>", |
650 |
|
|
"output": ["ParseError", ["StartTag", "a", {"href": "", "rel": ""}]]}, |
651 |
|
|
|
652 |
|
|
{"description": "<a href=''rel=''/>", |
653 |
|
|
"input": "<a href=''rel=''/>", |
654 |
|
|
"output": ["ParseError", "ParseError", |
655 |
|
|
["StartTag", "a", {"href": "", "rel": ""}]]}, |
656 |
|
|
|
657 |
|
|
{"description": "<link href=''rel=''/>", |
658 |
|
|
"input": "<link href=''rel=''/>", |
659 |
|
|
"output": ["ParseError", ["StartTag", "link", {"href": "", "rel": ""}]]}, |
660 |
|
|
|
661 |
|
|
{"description": "<a \">", |
662 |
|
|
"input": "<a \">", |
663 |
|
|
"output": ["ParseError", ["StartTag", "a", {"\"": ""}]]}, |
664 |
|
|
|
665 |
|
|
{"description": "<a \"\">", |
666 |
|
|
"input": "<a \"\">", |
667 |
|
|
"output": ["ParseError", "ParseError", ["StartTag", "a", {"\"\"": ""}]]}, |
668 |
|
|
|
669 |
|
|
{"description": "<a '>", |
670 |
|
|
"input": "<a '>", |
671 |
|
|
"output": ["ParseError", ["StartTag", "a", {"'": ""}]]}, |
672 |
|
|
|
673 |
|
|
{"description": "<a ''>", |
674 |
|
|
"input": "<a ''>", |
675 |
|
|
"output": ["ParseError", "ParseError", ["StartTag", "a", {"''": ""}]]}, |
676 |
|
|
|
677 |
|
|
{"description": "<a a\">", |
678 |
|
|
"input": "<a a\">", |
679 |
|
|
"output": ["ParseError", ["StartTag", "a", {"a\"": ""}]]}, |
680 |
|
|
|
681 |
|
|
{"description": "<a a'>", |
682 |
|
|
"input": "<a a'>", |
683 |
|
|
"output": ["ParseError", ["StartTag", "a", {"a'": ""}]]}, |
684 |
|
|
|
685 |
|
|
{"description": "<a a\"'>", |
686 |
|
|
"input": "<a a\"'>", |
687 |
|
|
"output": ["ParseError", "ParseError", ["StartTag", "a", {"a\"'": ""}]]}, |
688 |
|
|
|
689 |
|
|
{"description": "<a a=\">", |
690 |
|
|
"input": "<a a=\">", |
691 |
|
|
"output": ["ParseError", ["StartTag", "a", {"a": ">"}]]}, |
692 |
|
|
|
693 |
|
|
{"description": "<a a='>", |
694 |
|
|
"input": "<a a='>", |
695 |
|
|
"output": ["ParseError", ["StartTag", "a", {"a": ">"}]]}, |
696 |
|
|
|
697 |
|
|
{"description": "<a a=a\">", |
698 |
|
|
"input": "<a a=a\">", |
699 |
|
|
"output": ["ParseError", ["StartTag", "a", {"a": "a\""}]]}, |
700 |
|
|
|
701 |
|
|
{"description": "<a a=a'>", |
702 |
|
|
"input": "<a a=a'>", |
703 |
|
|
"output": ["ParseError", ["StartTag", "a", {"a": "a'"}]]}, |
704 |
|
|
|
705 |
|
|
{"description": "<a a=>", |
706 |
|
|
"input": "<a a=>", |
707 |
|
|
"output": [["StartTag", "a", {"a": ""}]]} |
708 |
wakaba |
1.4 |
|
709 |
|
|
]} |