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 |
wakaba |
1.20 |
"output":["ParseError",["DOCTYPE", "html", "", "", true]]}, |
118 |
wakaba |
1.9 |
|
119 |
|
|
{"description":"PUBLIC \u0022\u0022 \u0022\u0022 bogus", |
120 |
|
|
"input":"<!DOCTYPE html PUBLIC \u0022\u0022 \u0022\u0022 bogus>", |
121 |
wakaba |
1.20 |
"output":["ParseError",["DOCTYPE", "html", "", "", true]]}, |
122 |
wakaba |
1.9 |
|
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 |
wakaba |
1.20 |
|
135 |
|
|
{"description": "garbage after SYSTEM literal", |
136 |
|
|
"input": "<!DOCTYPE html SYSTEM 'a' b>", |
137 |
|
|
"output": ["ParseError", ["DOCTYPE", "html", null, "a", true]]}, |
138 |
|
|
|
139 |
|
|
{"description": "garbage after PUBLIC and SYSTEM literal", |
140 |
|
|
"input": "<!DOCTYPE html PUBLIC 'c' 'a' b>", |
141 |
|
|
"output": ["ParseError", ["DOCTYPE", "html", "c", "a", true]]}, |
142 |
|
|
|
143 |
|
|
{"description": "garbage immediately after SYSTEM literal", |
144 |
|
|
"input": "<!DOCTYPE html SYSTEM 'a'b>", |
145 |
|
|
"output": ["ParseError", ["DOCTYPE", "html", null, "a", true]]}, |
146 |
|
|
|
147 |
|
|
{"description": "garbage immediately after PUBLIC and SYSTEM literal", |
148 |
|
|
"input": "<!DOCTYPE html PUBLIC 'c' 'a'b>", |
149 |
|
|
"output": ["ParseError", ["DOCTYPE", "html", "c", "a", true]]}, |
150 |
wakaba |
1.13 |
|
151 |
wakaba |
1.21 |
{"description": "<!D>", |
152 |
|
|
"input": "<!D>", |
153 |
|
|
"output": ["ParseError", ["Comment", "D"]]}, |
154 |
|
|
|
155 |
|
|
{"description": "<!DO>", |
156 |
|
|
"input": "<!DO>", |
157 |
|
|
"output": ["ParseError", ["Comment", "DO"]]}, |
158 |
|
|
|
159 |
|
|
{"description": "<!DOc>", |
160 |
|
|
"input": "<!DOc>", |
161 |
|
|
"output": ["ParseError", ["Comment", "DOc"]]}, |
162 |
|
|
|
163 |
|
|
{"description": "<!dOcT>", |
164 |
|
|
"input": "<!dOcT>", |
165 |
|
|
"output": ["ParseError", ["Comment", "dOcT"]]}, |
166 |
|
|
|
167 |
|
|
{"description": "<!DoctY", |
168 |
|
|
"input": "<!DoctY", |
169 |
|
|
"output": ["ParseError", ["Comment", "DoctY"]]}, |
170 |
|
|
|
171 |
|
|
{"description": "<!doctyp!>", |
172 |
|
|
"input": "<!doctyp!>", |
173 |
|
|
"output": ["ParseError", ["Comment", "doctyp!"]]}, |
174 |
|
|
|
175 |
|
|
{"description": "<!Doc?>", |
176 |
|
|
"input": "<!Doc?>", |
177 |
|
|
"output": ["ParseError", ["Comment", "Doc?"]]}, |
178 |
|
|
|
179 |
|
|
{"description": "<!Doc<type>>", |
180 |
|
|
"input": "<!Doc<type>>", |
181 |
|
|
"output": ["ParseError", ["Comment", "Doc<type"], ["Character", ">"]]}, |
182 |
|
|
|
183 |
|
|
{"description": "<!DOCTYPE HTML P>", |
184 |
|
|
"input": "<!DOCTYPE HTML P>", |
185 |
|
|
"output": ["ParseError", ["DOCTYPE", "HTML", null, null, false]]}, |
186 |
|
|
|
187 |
|
|
{"description": "<!DOCTYPE HTML Pa>", |
188 |
|
|
"input": "<!DOCTYPE HTML Pa>", |
189 |
|
|
"output": ["ParseError", ["DOCTYPE", "HTML", null, null, false]]}, |
190 |
|
|
|
191 |
|
|
{"description": "<!DOCTYPE HTML Pua>", |
192 |
|
|
"input": "<!DOCTYPE HTML Pua>", |
193 |
|
|
"output": ["ParseError", ["DOCTYPE", "HTML", null, null, false]]}, |
194 |
|
|
|
195 |
|
|
{"description": "<!DOCTYPE HTML PUB>", |
196 |
|
|
"input": "<!DOCTYPE HTML PUB>", |
197 |
|
|
"output": ["ParseError", ["DOCTYPE", "HTML", null, null, false]]}, |
198 |
|
|
|
199 |
|
|
{"description": "<!DOCTYPE HTML pubL>", |
200 |
|
|
"input": "<!DOCTYPE HTML pubL>", |
201 |
|
|
"output": ["ParseError", ["DOCTYPE", "HTML", null, null, false]]}, |
202 |
|
|
|
203 |
|
|
{"description": "<!DOCTYPE HTML publication>", |
204 |
|
|
"input": "<!DOCTYPE HTML publication>", |
205 |
|
|
"output": ["ParseError", ["DOCTYPE", "HTML", null, null, false]]}, |
206 |
|
|
|
207 |
|
|
{"description": "<!DOCTYPE HTML publi>", |
208 |
|
|
"input": "<!DOCTYPE HTML publi>", |
209 |
|
|
"output": ["ParseError", ["DOCTYPE", "HTML", null, null, false]]}, |
210 |
|
|
|
211 |
|
|
{"description": "<!DOCTYPE HTML PULICID>", |
212 |
|
|
"input": "<!DOCTYPE HTML PUBLICID>", |
213 |
|
|
"output": ["ParseError", ["DOCTYPE", "HTML", null, null, false]]}, |
214 |
|
|
|
215 |
|
|
{"description": "<!DOCTYPE HTML S ''>", |
216 |
|
|
"input": "<!DOCTYPE HTML S ''>", |
217 |
|
|
"output": ["ParseError", ["DOCTYPE", "HTML", null, null, false]]}, |
218 |
|
|
|
219 |
|
|
{"description": "<!DOCTYPE HTML sy>", |
220 |
|
|
"input": "<!DOCTYPE HTML sy>", |
221 |
|
|
"output": ["ParseError", ["DOCTYPE", "HTML", null, null, false]]}, |
222 |
|
|
|
223 |
|
|
{"description": "<!DOCTYPE HTML sys ''>", |
224 |
|
|
"input": "<!DOCTYPE HTML sys ''>", |
225 |
|
|
"output": ["ParseError", ["DOCTYPE", "HTML", null, null, false]]}, |
226 |
|
|
|
227 |
|
|
{"description": "<!DOCTYPE HTML syst>", |
228 |
|
|
"input": "<!DOCTYPE HTML syst>", |
229 |
|
|
"output": ["ParseError", ["DOCTYPE", "HTML", null, null, false]]}, |
230 |
|
|
|
231 |
|
|
{"description": "<!DOCTYPE HTML SySter>", |
232 |
|
|
"input": "<!DOCTYPE HTML SySter>", |
233 |
|
|
"output": ["ParseError", ["DOCTYPE", "HTML", null, null, false]]}, |
234 |
|
|
|
235 |
|
|
{"description": "<!DOCTYPE HTML systemid>", |
236 |
|
|
"input": "<!DOCTYPE HTML systemid>", |
237 |
|
|
"output": ["ParseError", ["DOCTYPE", "HTML", null, null, false]]}, |
238 |
|
|
|
239 |
wakaba |
1.14 |
{"description":"<!---x-->", |
240 |
|
|
"input":"<!---x-->", |
241 |
|
|
"output":[["Comment", "-x"]]}, |
242 |
|
|
|
243 |
|
|
{"description":"<!----x-->", |
244 |
|
|
"input":"<!----x-->", |
245 |
|
|
"output":["ParseError", ["Comment", "--x"]]}, |
246 |
|
|
|
247 |
wakaba |
1.1 |
{"description":"non-PCDATA content model flag, start tag-like string", |
248 |
|
|
"contentModelFlags":["PLAINTEXT","RCDATA","CDATA"], |
249 |
|
|
"input":"<div>", |
250 |
wakaba |
1.2 |
"output":[["Character", "<div>"]]}, |
251 |
|
|
|
252 |
|
|
{"description":"end tag followed by character data", |
253 |
|
|
"contentModelFlags":["RCDATA","CDATA"], |
254 |
|
|
"lastStartTag":"xxx", |
255 |
|
|
"input":"AB</xxx>CD", |
256 |
wakaba |
1.4 |
"output":[["Character", "AB"],["EndTag", "xxx"],["Character", "CD"]]}, |
257 |
wakaba |
1.1 |
|
258 |
wakaba |
1.12 |
{"description":"NULL character reference", |
259 |
|
|
"input":"�", |
260 |
|
|
"output":["ParseError", ["Character", "\uFFFD"]]}, |
261 |
|
|
|
262 |
|
|
{"description":"NULL character reference", |
263 |
|
|
"input":"�", |
264 |
|
|
"output":["ParseError", ["Character", "\uFFFD"]]}, |
265 |
|
|
|
266 |
|
|
{"description":"character entity ", |
267 |
|
|
"input":" ", |
268 |
|
|
"output":["ParseError", ["Character", "\u000A"]]}, |
269 |
|
|
|
270 |
|
|
{"description":"character entity 
", |
271 |
|
|
"input":"
", |
272 |
|
|
"output":["ParseError", ["Character", "\u000A"]]}, |
273 |
|
|
|
274 |
|
|
{"description":"character entities ", |
275 |
|
|
"input":" ", |
276 |
|
|
"output":["ParseError", ["Character", "\u000A\u000A"]]}, |
277 |
|
|
|
278 |
|
|
{"description":"character entity followed by a LF", |
279 |
|
|
"input":" \u000A", |
280 |
|
|
"output":["ParseError", ["Character", "\u000A\u000A"]]}, |
281 |
|
|
|
282 |
wakaba |
1.4 |
{"description":"c1 character references", |
283 |
|
|
"input":"€‚ƒ„…†‡", |
284 |
|
|
"output":[ |
285 |
|
|
"ParseError", ["Character", "\u20AC"], |
286 |
|
|
"ParseError", ["Character", "\uFFFD"], |
287 |
|
|
"ParseError", ["Character", "\u201A"], |
288 |
|
|
"ParseError", ["Character", "\u0192"], |
289 |
|
|
"ParseError", ["Character", "\u201E"], |
290 |
|
|
"ParseError", ["Character", "\u2026"], |
291 |
|
|
"ParseError", ["Character", "\u2020"], |
292 |
|
|
"ParseError", ["Character", "\u2021"] |
293 |
|
|
]}, |
294 |
|
|
{"description":"c1 character references", |
295 |
|
|
"input":"ˆ‰Š‹ŒŽ", |
296 |
|
|
"output":[ |
297 |
|
|
"ParseError", ["Character", "\u02C6"], |
298 |
|
|
"ParseError", ["Character", "\u2030"], |
299 |
|
|
"ParseError", ["Character", "\u0160"], |
300 |
|
|
"ParseError", ["Character", "\u2039"], |
301 |
|
|
"ParseError", ["Character", "\u0152"], |
302 |
|
|
"ParseError", ["Character", "\uFFFD"], |
303 |
|
|
"ParseError", ["Character", "\u017D"], |
304 |
|
|
"ParseError", ["Character", "\uFFFD"] |
305 |
|
|
]}, |
306 |
|
|
{"description":"c1 character references", |
307 |
|
|
"input":"‘’“”•–—", |
308 |
|
|
"output":[ |
309 |
|
|
"ParseError", ["Character", "\uFFFD"], |
310 |
|
|
"ParseError", ["Character", "\u2018"], |
311 |
|
|
"ParseError", ["Character", "\u2019"], |
312 |
|
|
"ParseError", ["Character", "\u201C"], |
313 |
|
|
"ParseError", ["Character", "\u201D"], |
314 |
|
|
"ParseError", ["Character", "\u2022"], |
315 |
|
|
"ParseError", ["Character", "\u2013"], |
316 |
|
|
"ParseError", ["Character", "\u2014"] |
317 |
|
|
]}, |
318 |
|
|
{"description":"c1 character references", |
319 |
|
|
"input":"˜™š›œžŸ", |
320 |
|
|
"output":[ |
321 |
|
|
"ParseError", ["Character", "\u02DC"], |
322 |
|
|
"ParseError", ["Character", "\u2122"], |
323 |
|
|
"ParseError", ["Character", "\u0161"], |
324 |
|
|
"ParseError", ["Character", "\u203A"], |
325 |
|
|
"ParseError", ["Character", "\u0153"], |
326 |
|
|
"ParseError", ["Character", "\uFFFD"], |
327 |
|
|
"ParseError", ["Character", "\u017E"], |
328 |
|
|
"ParseError", ["Character", "\u0178"] |
329 |
|
|
]}, |
330 |
|
|
|
331 |
|
|
{"description":"c1 character references", |
332 |
|
|
"input":"€‚ƒ„…†‡", |
333 |
|
|
"output":[ |
334 |
|
|
"ParseError", ["Character", "\u20AC"], |
335 |
|
|
"ParseError", ["Character", "\uFFFD"], |
336 |
|
|
"ParseError", ["Character", "\u201A"], |
337 |
|
|
"ParseError", ["Character", "\u0192"], |
338 |
|
|
"ParseError", ["Character", "\u201E"], |
339 |
|
|
"ParseError", ["Character", "\u2026"], |
340 |
|
|
"ParseError", ["Character", "\u2020"], |
341 |
|
|
"ParseError", ["Character", "\u2021"] |
342 |
|
|
]}, |
343 |
|
|
{"description":"c1 character references", |
344 |
|
|
"input":"ˆ‰Š‹ŒŽ", |
345 |
|
|
"output":[ |
346 |
|
|
"ParseError", ["Character", "\u02C6"], |
347 |
|
|
"ParseError", ["Character", "\u2030"], |
348 |
|
|
"ParseError", ["Character", "\u0160"], |
349 |
|
|
"ParseError", ["Character", "\u2039"], |
350 |
|
|
"ParseError", ["Character", "\u0152"], |
351 |
|
|
"ParseError", ["Character", "\uFFFD"], |
352 |
|
|
"ParseError", ["Character", "\u017D"], |
353 |
|
|
"ParseError", ["Character", "\uFFFD"] |
354 |
|
|
]}, |
355 |
|
|
{"description":"c1 character references", |
356 |
|
|
"input":"‘’“”•–—", |
357 |
|
|
"output":[ |
358 |
|
|
"ParseError", ["Character", "\uFFFD"], |
359 |
|
|
"ParseError", ["Character", "\u2018"], |
360 |
|
|
"ParseError", ["Character", "\u2019"], |
361 |
|
|
"ParseError", ["Character", "\u201C"], |
362 |
|
|
"ParseError", ["Character", "\u201D"], |
363 |
|
|
"ParseError", ["Character", "\u2022"], |
364 |
|
|
"ParseError", ["Character", "\u2013"], |
365 |
|
|
"ParseError", ["Character", "\u2014"] |
366 |
|
|
]}, |
367 |
|
|
{"description":"c1 character references", |
368 |
|
|
"input":"˜™š›œžŸ", |
369 |
|
|
"output":[ |
370 |
|
|
"ParseError", ["Character", "\u02DC"], |
371 |
|
|
"ParseError", ["Character", "\u2122"], |
372 |
|
|
"ParseError", ["Character", "\u0161"], |
373 |
|
|
"ParseError", ["Character", "\u203A"], |
374 |
|
|
"ParseError", ["Character", "\u0153"], |
375 |
|
|
"ParseError", ["Character", "\uFFFD"], |
376 |
|
|
"ParseError", ["Character", "\u017E"], |
377 |
|
|
"ParseError", ["Character", "\u0178"] |
378 |
wakaba |
1.5 |
]}, |
379 |
|
|
|
380 |
wakaba |
1.16 |
{"description":"Numeric entity representing a Windows-1252 'codepoint'", |
381 |
|
|
"input":"‰", |
382 |
|
|
"output":["ParseError", ["Character", "\u2030"]]}, |
383 |
|
|
|
384 |
|
|
{"description":"Hexadecimal entity representing a Windows-1252 'codepoint'", |
385 |
|
|
"input":"‰", |
386 |
|
|
"output":["ParseError", ["Character", "\u2030"]]}, |
387 |
|
|
|
388 |
wakaba |
1.12 |
{"description":"surrogate character reference", |
389 |
|
|
"input":"�", |
390 |
|
|
"output":["ParseError", ["Character", "\uFFFD"]]}, |
391 |
|
|
|
392 |
|
|
{"description":"surrogate character references", |
393 |
|
|
"input":"��", |
394 |
|
|
"output":["ParseError", ["Character", "\uFFFD"], |
395 |
|
|
"ParseError", ["Character", "\uFFFD"]]}, |
396 |
|
|
|
397 |
|
|
{"description":"surrogate character reference", |
398 |
|
|
"input":"\uD800�", |
399 |
wakaba |
1.22 |
"output":["ParseError", ["Character", "\uD800"], |
400 |
wakaba |
1.12 |
"ParseError", ["Character", "\uFFFD"]]}, |
401 |
|
|
|
402 |
|
|
{"description":"surrogate character reference", |
403 |
|
|
"input":"�\uDFFF", |
404 |
wakaba |
1.22 |
"output":["ParseError", ["Character", "\uFFFD"], |
405 |
|
|
"ParseError", ["Character", "\uDFFF"]]}, |
406 |
wakaba |
1.12 |
|
407 |
|
|
{"description":"surrogate character reference", |
408 |
|
|
"input":"�", |
409 |
|
|
"output":["ParseError", ["Character", "\uFFFD"]]}, |
410 |
|
|
|
411 |
|
|
{"description":"surrogate character reference", |
412 |
|
|
"input":"�", |
413 |
|
|
"output":["ParseError", ["Character", "\uFFFD"]]}, |
414 |
|
|
|
415 |
|
|
{"description":"non-Unicode character reference", |
416 |
|
|
"input":"�", |
417 |
|
|
"output":["ParseError", ["Character", "\uFFFD"]]}, |
418 |
|
|
|
419 |
|
|
{"description":"non-Unicode character reference", |
420 |
|
|
"input":"�", |
421 |
|
|
"output":["ParseError", ["Character", "\uFFFD"]]}, |
422 |
|
|
|
423 |
wakaba |
1.15 |
{"description":"Broken hcro (&#x)", |
424 |
|
|
"input":"&#x", |
425 |
|
|
"output":["ParseError", ["Character", "&#x"]]}, |
426 |
|
|
|
427 |
|
|
{"description":"Broken hcro (&#X)", |
428 |
|
|
"input":"&#X", |
429 |
|
|
"output":["ParseError", ["Character", "&#X"]]}, |
430 |
|
|
|
431 |
|
|
{"description":"Broken hcro (&#x;)", |
432 |
|
|
"input":"&#x;", |
433 |
|
|
"output":["ParseError", ["Character", "&#x;"]]}, |
434 |
|
|
|
435 |
|
|
{"description":"Broken hcro (&#X;)", |
436 |
|
|
"input":"&#X;", |
437 |
|
|
"output":["ParseError", ["Character", "&#X;"]]}, |
438 |
|
|
|
439 |
|
|
{"description":"Broken hcro (&#xg)", |
440 |
|
|
"input":"&#xg", |
441 |
|
|
"output":["ParseError", ["Character", "&#xg"]]}, |
442 |
|
|
|
443 |
|
|
{"description":"Broken hcro (&#Xg)", |
444 |
|
|
"input":"&#Xg", |
445 |
|
|
"output":["ParseError", ["Character", "&#Xg"]]}, |
446 |
|
|
|
447 |
|
|
{"description":"Broken hcro (&#xg;)", |
448 |
|
|
"input":"&#xg;", |
449 |
|
|
"output":["ParseError", ["Character", "&#xg;"]]}, |
450 |
|
|
|
451 |
|
|
{"description":"Broken hcro (&#Xg;)", |
452 |
|
|
"input":"&#Xg;", |
453 |
|
|
"output":["ParseError", ["Character", "&#Xg;"]]}, |
454 |
|
|
|
455 |
|
|
{"description":"Broken hcro (&#x!)", |
456 |
|
|
"input":"&#x!", |
457 |
|
|
"output":["ParseError", ["Character", "&#x!"]]}, |
458 |
|
|
|
459 |
|
|
{"description":"Broken hcro (&#X!)", |
460 |
|
|
"input":"&#X!", |
461 |
|
|
"output":["ParseError", ["Character", "&#X!"]]}, |
462 |
|
|
|
463 |
wakaba |
1.5 |
{"description":"NULL character", |
464 |
|
|
"input":"\u0000", |
465 |
wakaba |
1.6 |
"output":["ParseError",["Character", "\uFFFD"]]}, |
466 |
|
|
|
467 |
|
|
{"description":"™", |
468 |
|
|
"input":"™", |
469 |
wakaba |
1.7 |
"output":[["Character", "\u2122"]]}, |
470 |
|
|
|
471 |
|
|
{"description":"⟨", |
472 |
|
|
"input":"⟨", |
473 |
wakaba |
1.18 |
"output":[["Character", "\u27E8"]]}, |
474 |
wakaba |
1.7 |
|
475 |
|
|
{"description":"⟩", |
476 |
|
|
"input":"⟩", |
477 |
wakaba |
1.18 |
"output":[["Character", "\u27E9"]]}, |
478 |
wakaba |
1.7 |
|
479 |
|
|
{"description":"&;", |
480 |
|
|
"input":"&;", |
481 |
wakaba |
1.8 |
"output":[["Character", "&;"]]}, |
482 |
|
|
|
483 |
wakaba |
1.11 |
{"description":"&HT", |
484 |
|
|
"input":"&\u0009", |
485 |
|
|
"output":[["Character", "&\u0009"]]}, |
486 |
|
|
|
487 |
|
|
{"description":"&LF", |
488 |
|
|
"input":"&\u000A", |
489 |
|
|
"output":[["Character", "&\u000A"]]}, |
490 |
|
|
|
491 |
|
|
{"description":"&VT", |
492 |
|
|
"input":"&\u000B", |
493 |
|
|
"output":[["Character", "&\u000B"]]}, |
494 |
|
|
|
495 |
|
|
{"description":"&FF", |
496 |
|
|
"input":"&\u000C", |
497 |
|
|
"output":[["Character", "&\u000C"]]}, |
498 |
|
|
|
499 |
|
|
{"description":"&SP", |
500 |
|
|
"input":"& ", |
501 |
|
|
"output":[["Character", "& "]]}, |
502 |
|
|
|
503 |
|
|
{"description":"&<", |
504 |
|
|
"input":"&<", |
505 |
wakaba |
1.12 |
"output":[["Character", "&"], "ParseError", ["Character", "<"]]}, |
506 |
wakaba |
1.11 |
|
507 |
|
|
{"description":"&<p>", |
508 |
|
|
"input":"&<p>", |
509 |
|
|
"output":[["Character", "&"], ["StartTag", "p", {}]]}, |
510 |
|
|
|
511 |
|
|
{"description":"&&", |
512 |
|
|
"input":"&&", |
513 |
|
|
"output":[["Character", "&&"]]}, |
514 |
|
|
|
515 |
|
|
{"description":"&&", |
516 |
|
|
"input":"&&", |
517 |
|
|
"output":[["Character", "&&"]]}, |
518 |
|
|
|
519 |
|
|
{"description":"&", |
520 |
|
|
"input":"&", |
521 |
|
|
"output":[["Character", "&"]]}, |
522 |
wakaba |
1.12 |
|
523 |
|
|
{"description":"named character reference w/o refc", |
524 |
|
|
"input":"&abc", |
525 |
|
|
"output":["ParseError", ["Character", "&abc"]]}, |
526 |
|
|
|
527 |
|
|
{"description":"named character reference", |
528 |
|
|
"input":"&abc", |
529 |
|
|
"output":[["Character", "&abc"]]}, |
530 |
|
|
|
531 |
|
|
{"description":"named character reference w/o refc", |
532 |
|
|
"input":"&abc", |
533 |
|
|
"output":["ParseError", ["Character", "&abc"]]}, |
534 |
|
|
|
535 |
|
|
{"description":"unknown named character reference", |
536 |
|
|
"input":"&abc;", |
537 |
|
|
"output":["ParseError", ["Character", "&abc;"]]}, |
538 |
|
|
|
539 |
|
|
{"description":"named character reference w/o refc in attr", |
540 |
|
|
"input":"<a href='&abc'>", |
541 |
|
|
"output":["ParseError", ["StartTag", "a", {"href": "&abc"}]]}, |
542 |
|
|
|
543 |
|
|
{"description":"named character reference in attr", |
544 |
|
|
"input":"<a href='&abc'>", |
545 |
|
|
"output":[["StartTag", "a", {"href": "&abc"}]]}, |
546 |
|
|
|
547 |
|
|
{"description":"named character reference w/o refc in attr", |
548 |
|
|
"input":"<a href='&abc'>", |
549 |
|
|
"output":["ParseError", ["StartTag", "a", {"href": "&abc"}]]}, |
550 |
|
|
|
551 |
|
|
{"description":"unknown named character reference in attr", |
552 |
|
|
"input":"<a href='&abc;'>", |
553 |
|
|
"output":["ParseError", ["StartTag", "a", {"href": "&abc;"}]]}, |
554 |
wakaba |
1.15 |
|
555 |
|
|
{"description":"entity w/o refc at the end of unterminated attribute value", |
556 |
|
|
"input":"<a href='©", |
557 |
|
|
"output":["ParseError", "ParseError", ["StartTag", "a", {"href": "\u00A9"}]]}, |
558 |
|
|
|
559 |
|
|
{"description":"entity w/o refc at the end of attribute value", |
560 |
|
|
"input":"<a href='©'>", |
561 |
|
|
"output":["ParseError", ["StartTag", "a", {"href": "\u00A9"}]]}, |
562 |
|
|
|
563 |
|
|
{"description":"entity w/refc at the end of attribute value", |
564 |
|
|
"input":"<a href='©'>", |
565 |
|
|
"output":[["StartTag", "a", {"href": "\u00A9"}]]}, |
566 |
|
|
|
567 |
|
|
{"description":"entity w/o refc href='©!'", |
568 |
|
|
"input":"<a href='©!'>", |
569 |
|
|
"output":["ParseError", ["StartTag", "a", {"href": "\u00A9!"}]]}, |
570 |
|
|
|
571 |
|
|
{"description":"entity w/o refc href='©=ok'", |
572 |
|
|
"input":"<a href='©=ok'>", |
573 |
|
|
"output":["ParseError", ["StartTag", "a", {"href": "\u00A9=ok"}]]}, |
574 |
|
|
|
575 |
|
|
{"description":"entity w/o refc href='©right'", |
576 |
|
|
"input":"<a href='©right'>", |
577 |
|
|
"output":["ParseError", ["StartTag", "a", {"href": "©right"}]]}, |
578 |
|
|
|
579 |
|
|
{"description":"entity w/o refc href='©right;'", |
580 |
|
|
"input":"<a href='©right;'>", |
581 |
|
|
"output":["ParseError", ["StartTag", "a", {"href": "©right;"}]]}, |
582 |
|
|
|
583 |
|
|
{"description":"entity w/o refc href='©rightc'", |
584 |
|
|
"input":"<a href='©rightc'>", |
585 |
|
|
"output":["ParseError", ["StartTag", "a", {"href": "©rightc"}]]}, |
586 |
|
|
|
587 |
|
|
{"description":"entity w/o refc href='©rightcd'", |
588 |
|
|
"input":"<a href='©rightcd'>", |
589 |
|
|
"output":["ParseError", ["StartTag", "a", {"href": "©rightcd"}]]}, |
590 |
wakaba |
1.11 |
|
591 |
wakaba |
1.8 |
{"description":"cdata end tag containing <", |
592 |
|
|
"contentModelFlags":["RCDATA","CDATA"], |
593 |
|
|
"lastStartTag":"xxx", |
594 |
|
|
"input":"</xxx<div>", |
595 |
wakaba |
1.10 |
"output":[["Character", "</xxx<div>"]]}, |
596 |
wakaba |
1.8 |
|
597 |
|
|
{"description":"< in tag name state", |
598 |
|
|
"input":"<p<div>", |
599 |
|
|
"output":[["StartTag", "p<div", {}]]}, |
600 |
|
|
|
601 |
|
|
{"description":"< in before attribute name state", |
602 |
|
|
"input":"<p <div>", |
603 |
|
|
"output":[["StartTag", "p", {"<div":""}]]}, |
604 |
|
|
|
605 |
|
|
{"description":"< in attribute name state", |
606 |
|
|
"input":"<p align<div>", |
607 |
|
|
"output":[["StartTag", "p", {"align<div":""}]]}, |
608 |
|
|
|
609 |
|
|
{"description":"< in after attribute name state", |
610 |
|
|
"input":"<p align <div>", |
611 |
|
|
"output":[["StartTag", "p", {"align":"","<div":""}]]}, |
612 |
|
|
|
613 |
|
|
{"description":"< in before attribute value state", |
614 |
|
|
"input":"<p align=<div>", |
615 |
|
|
"output":[["StartTag", "p", {"align":"<div"}]]}, |
616 |
|
|
|
617 |
|
|
{"description":"< in attribute value (unquoted) state", |
618 |
|
|
"input":"<p align=left<div>", |
619 |
|
|
"output":[["StartTag", "p", {"align":"left<div"}]]}, |
620 |
|
|
|
621 |
|
|
{"description":"< in attribute value (single-unquoted) state", |
622 |
|
|
"input":"<p align='left<div>", |
623 |
|
|
"output":["ParseError", ["StartTag", "p", {"align":"left<div>"}]]}, |
624 |
|
|
|
625 |
|
|
{"description":"< in attribute value (double-unquoted) state", |
626 |
|
|
"input":"<p align=\u0022left<div>", |
627 |
wakaba |
1.17 |
"output":["ParseError", ["StartTag", "p", {"align":"left<div>"}]]}, |
628 |
|
|
|
629 |
|
|
{"description":"/''b=\"\"", |
630 |
|
|
"input": "<a /''b=\"\">", |
631 |
wakaba |
1.19 |
"output": ["ParseError", "ParseError", "ParseError", |
632 |
|
|
["StartTag", "a", {"''b": ""}]]}, |
633 |
wakaba |
1.17 |
|
634 |
|
|
{"description":"/\"\"b=\"\"", |
635 |
|
|
"input": "<a /\"\"b=\"\">", |
636 |
wakaba |
1.19 |
"output": ["ParseError", "ParseError", "ParseError", |
637 |
|
|
["StartTag", "a", {"\"\"b": ""}]]}, |
638 |
wakaba |
1.17 |
|
639 |
|
|
{"description":"\"b=\"\"", |
640 |
|
|
"input": "<a \"b=\"\">", |
641 |
wakaba |
1.19 |
"output": ["ParseError", ["StartTag", "a", {"\"b": ""}]]}, |
642 |
wakaba |
1.17 |
|
643 |
|
|
{"description":"\"\"b=\"\"", |
644 |
|
|
"input": "<a \"\"b=\"\">", |
645 |
wakaba |
1.19 |
"output": ["ParseError", "ParseError", ["StartTag", "a", {"\"\"b": ""}]]}, |
646 |
wakaba |
1.17 |
|
647 |
|
|
{"description":"'b=\"\"", |
648 |
|
|
"input": "<a 'b=\"\">", |
649 |
wakaba |
1.19 |
"output": ["ParseError", ["StartTag", "a", {"'b": ""}]]}, |
650 |
wakaba |
1.17 |
|
651 |
|
|
{"description":"''b=\"\"", |
652 |
|
|
"input": "<a ''b=\"\">", |
653 |
wakaba |
1.19 |
"output": ["ParseError", "ParseError", ["StartTag", "a", {"''b": ""}]]}, |
654 |
wakaba |
1.17 |
|
655 |
|
|
{"description":"/b=\"\"", |
656 |
|
|
"input": "<a /b=\"\">", |
657 |
|
|
"output": ["ParseError", ["StartTag", "a", {"b": ""}]]}, |
658 |
|
|
|
659 |
|
|
{"description":"b/=\"\"", |
660 |
|
|
"input": "<a b/=\"\">", |
661 |
wakaba |
1.19 |
"output": ["ParseError", "ParseError", "ParseError", "ParseError", |
662 |
|
|
["StartTag", "a", {"b": "", "=\"\"": ""}]]}, |
663 |
wakaba |
1.17 |
|
664 |
|
|
{"description":"b/c=\"\"", |
665 |
|
|
"input": "<a b/c=\"\">", |
666 |
|
|
"output": ["ParseError", ["StartTag", "a", {"b": "", "c": ""}]]}, |
667 |
|
|
|
668 |
|
|
{"description":"bc[NULL]=\"\"", |
669 |
|
|
"input": "<a bc\u0000=\"\">", |
670 |
|
|
"output": ["ParseError", ["StartTag", "a", {"bc\uFFFD": ""}]]}, |
671 |
|
|
|
672 |
|
|
{"description":"b[NULL]c=\"\"", |
673 |
|
|
"input": "<a b\u0000c=\"\">", |
674 |
|
|
"output": ["ParseError", ["StartTag", "a", {"b\uFFFDc": ""}]]}, |
675 |
|
|
|
676 |
|
|
{"description":"[NULL]bc=\"\"", |
677 |
|
|
"input": "<a \u0000bc=\"\">", |
678 |
wakaba |
1.19 |
"output": ["ParseError", ["StartTag", "a", {"\uFFFDbc": ""}]]}, |
679 |
|
|
|
680 |
|
|
{"description": "<span ===>", |
681 |
|
|
"input": "<span ===>", |
682 |
|
|
"output": ["ParseError", "ParseError", ["StartTag", "span", {"=": "="}]]}, |
683 |
|
|
|
684 |
|
|
{"description": "<span a==>", |
685 |
|
|
"input": "<span a==>", |
686 |
|
|
"output": ["ParseError", ["StartTag", "span", {"a": "="}]]}, |
687 |
|
|
|
688 |
|
|
{"description": "<span ==a>", |
689 |
|
|
"input": "<span ==a>", |
690 |
|
|
"output": ["ParseError", ["StartTag", "span", {"=": "a"}]]}, |
691 |
|
|
|
692 |
|
|
{"description": "<span a=b=>", |
693 |
|
|
"input": "<span a=b=>", |
694 |
|
|
"output": ["ParseError", ["StartTag", "span", {"a": "b="}]]}, |
695 |
|
|
|
696 |
|
|
{"description": "<span =x\"=\"x>", |
697 |
|
|
"input": "<span =x\"=\"x>", |
698 |
|
|
"output": ["ParseError", "ParseError", "ParseError", |
699 |
|
|
["StartTag", "span", {"=x\"": "x>"}]]}, |
700 |
|
|
|
701 |
|
|
{"description": "<span =x\"=\"x\">", |
702 |
|
|
"input": "<span =x\"=\"x\">", |
703 |
|
|
"output": ["ParseError", "ParseError", ["StartTag", "span", {"=x\"": "x"}]]}, |
704 |
|
|
|
705 |
wakaba |
1.25 |
{"description": "bad attribute name (HTML5 revision 2123), '", |
706 |
|
|
"input": "<foo bar '>", |
707 |
|
|
"output": ["ParseError", ["StartTag", "foo", {"bar": "", "'": ""}]]}, |
708 |
|
|
|
709 |
|
|
{"description": "bad attribute name (HTML5 revision 2123), \"", |
710 |
|
|
"input": "<foo bar \">", |
711 |
|
|
"output": ["ParseError", ["StartTag", "foo", {"bar": "", "\"": ""}]]}, |
712 |
|
|
|
713 |
|
|
{"description": "bad attribute name (HTML5 revision 2123), 'x", |
714 |
|
|
"input": "<foo bar 'x>", |
715 |
|
|
"output": ["ParseError", ["StartTag", "foo", {"bar": "", "'x": ""}]]}, |
716 |
|
|
|
717 |
|
|
{"description": "bad attribute name (HTML5 revision 2123), \"x", |
718 |
|
|
"input": "<foo bar \"x>", |
719 |
|
|
"output": ["ParseError", ["StartTag", "foo", {"bar": "", "\"x": ""}]]}, |
720 |
|
|
|
721 |
|
|
{"description": "empty unquoted attribute value (HTML5 revision 2122)", |
722 |
|
|
"input": "<foo bar=>", |
723 |
|
|
"output": ["ParseError", ["StartTag", "foo", {"bar": ""}]]}, |
724 |
|
|
|
725 |
|
|
{"description": "empty unquoted attribute value (HTML5 revision 2122)", |
726 |
|
|
"input": "</foo bar=>", |
727 |
|
|
"output": ["ParseError", "ParseError", ["EndTag", "foo"]]}, |
728 |
|
|
|
729 |
|
|
{"description": "empty unquoted attribute value followed by another attr", |
730 |
|
|
"input": "<foo bar= baz=>", |
731 |
|
|
"output": ["ParseError", ["StartTag", "foo", {"bar": "baz="}]]}, |
732 |
|
|
|
733 |
wakaba |
1.19 |
{"description":"&\"", |
734 |
|
|
"input": "&\"", |
735 |
|
|
"output": ["ParseError", ["Character", "&\""]]}, |
736 |
|
|
|
737 |
|
|
{"description":"&'", |
738 |
|
|
"input": "&'", |
739 |
|
|
"output": ["ParseError", ["Character", "&'"]]}, |
740 |
|
|
|
741 |
|
|
{"description":"<a href=\"&\">", |
742 |
|
|
"input": "<a href=\"&\">", |
743 |
|
|
"output": [["StartTag", "a", {"href": "&"}]]}, |
744 |
|
|
|
745 |
|
|
{"description":"<a href=\"&'\">", |
746 |
|
|
"input": "<a href=\"&'\">", |
747 |
|
|
"output": ["ParseError", ["StartTag", "a", {"href": "&'"}]]}, |
748 |
|
|
|
749 |
|
|
{"description":"<a href='&'>", |
750 |
|
|
"input": "<a href='&'>", |
751 |
|
|
"output": [["StartTag", "a", {"href": "&"}]]}, |
752 |
|
|
|
753 |
|
|
{"description":"<a href='&\"'>", |
754 |
|
|
"input": "<a href='&\"'>", |
755 |
|
|
"output": ["ParseError", ["StartTag", "a", {"href": "&\""}]]}, |
756 |
|
|
|
757 |
|
|
{"description":"<a href=&\">", |
758 |
|
|
"input": "<a href=&\">", |
759 |
|
|
"output": ["ParseError", "ParseError", ["StartTag", "a", {"href": "&\""}]]}, |
760 |
|
|
|
761 |
|
|
{"description":"<a href=&'>", |
762 |
|
|
"input": "<a href=&'>", |
763 |
|
|
"output": ["ParseError", "ParseError", ["StartTag", "a", {"href": "&'"}]]}, |
764 |
|
|
|
765 |
|
|
{"description": "<!->-->", |
766 |
|
|
"input": "<!->-->", |
767 |
|
|
"output": ["ParseError", ["Comment", "-"], ["Character", "-->"]]}, |
768 |
|
|
|
769 |
|
|
{"description": "<!!--->-->", |
770 |
|
|
"input": "<!!--->-->", |
771 |
|
|
"output": ["ParseError", ["Comment", "!---"], ["Character", "-->"]]}, |
772 |
|
|
|
773 |
|
|
{"description": "<a href=''rel=''>", |
774 |
|
|
"input": "<a href=''rel=''>", |
775 |
|
|
"output": ["ParseError", ["StartTag", "a", {"href": "", "rel": ""}]]}, |
776 |
|
|
|
777 |
|
|
{"description": "<a href=\"\"rel=''>", |
778 |
|
|
"input": "<a href=\"\"rel=''>", |
779 |
|
|
"output": ["ParseError", ["StartTag", "a", {"href": "", "rel": ""}]]}, |
780 |
|
|
|
781 |
|
|
{"description": "<a href=''/rel=''>", |
782 |
|
|
"input": "<a href=''/rel=''>", |
783 |
|
|
"output": ["ParseError", ["StartTag", "a", {"href": "", "rel": ""}]]}, |
784 |
|
|
|
785 |
|
|
{"description": "<a href=''rel=''/>", |
786 |
|
|
"input": "<a href=''rel=''/>", |
787 |
wakaba |
1.24 |
"output": ["ParseError", |
788 |
|
|
["StartTag", "a", {"href": "", "rel": ""}, true]]}, |
789 |
wakaba |
1.19 |
|
790 |
|
|
{"description": "<link href=''rel=''/>", |
791 |
|
|
"input": "<link href=''rel=''/>", |
792 |
wakaba |
1.24 |
"output": ["ParseError", ["StartTag", "link", {"href": "", "rel": ""}, true]]}, |
793 |
wakaba |
1.19 |
|
794 |
wakaba |
1.21 |
{"description": "permitted slash after a space", |
795 |
|
|
"input": "<br />", |
796 |
wakaba |
1.24 |
"output": [["StartTag", "br", {}, true]]}, |
797 |
wakaba |
1.21 |
|
798 |
|
|
{"description": "slash in tag after a space", |
799 |
|
|
"input": "<br / >", |
800 |
|
|
"output": ["ParseError", ["StartTag", "br", {}]]}, |
801 |
|
|
|
802 |
|
|
{"description": "non-permitted slash after a space", |
803 |
|
|
"input": "<b />", |
804 |
wakaba |
1.24 |
"output": [["StartTag", "b", {}, true]]}, |
805 |
wakaba |
1.21 |
|
806 |
|
|
{"description": "end tag (non-)permitted slash after a space", |
807 |
|
|
"input": "</br />", |
808 |
|
|
"output": ["ParseError", ["EndTag", "br"]]}, |
809 |
|
|
|
810 |
|
|
{"description": "permitted slash after attribute name", |
811 |
|
|
"input": "<br class/>", |
812 |
wakaba |
1.24 |
"output": [["StartTag", "br", {"class": ""}, true]]}, |
813 |
wakaba |
1.21 |
|
814 |
|
|
{"description": "slash in tag after attribute name", |
815 |
|
|
"input": "<br class/ >", |
816 |
|
|
"output": ["ParseError", ["StartTag", "br", {"class": ""}]]}, |
817 |
|
|
|
818 |
|
|
{"description": "non permitted slash after attribute name", |
819 |
|
|
"input": "<b class/>", |
820 |
wakaba |
1.24 |
"output": [["StartTag", "b", {"class": ""}, true]]}, |
821 |
wakaba |
1.21 |
|
822 |
|
|
{"description": "end tag (non-)permitted slash after attribute name", |
823 |
|
|
"input": "</br class/>", |
824 |
|
|
"output": ["ParseError", "ParseError", ["EndTag", "br"]]}, |
825 |
|
|
|
826 |
|
|
{"description": "permitted slash in after attribute name state", |
827 |
|
|
"input": "<br class />", |
828 |
wakaba |
1.24 |
"output": [["StartTag", "br", {"class": ""}, true]]}, |
829 |
wakaba |
1.21 |
|
830 |
|
|
{"description": "non permitted slash in after attribute name state", |
831 |
|
|
"input": "<b class />", |
832 |
wakaba |
1.24 |
"output": [["StartTag", "b", {"class": ""}, true]]}, |
833 |
wakaba |
1.21 |
|
834 |
|
|
{"description": "end tag (non-)permitted slash in after attribute name state", |
835 |
|
|
"input": "</br class />", |
836 |
|
|
"output": ["ParseError", "ParseError", ["EndTag", "br"]]}, |
837 |
|
|
|
838 |
wakaba |
1.19 |
{"description": "<a \">", |
839 |
|
|
"input": "<a \">", |
840 |
|
|
"output": ["ParseError", ["StartTag", "a", {"\"": ""}]]}, |
841 |
|
|
|
842 |
|
|
{"description": "<a \"\">", |
843 |
|
|
"input": "<a \"\">", |
844 |
|
|
"output": ["ParseError", "ParseError", ["StartTag", "a", {"\"\"": ""}]]}, |
845 |
|
|
|
846 |
|
|
{"description": "<a '>", |
847 |
|
|
"input": "<a '>", |
848 |
|
|
"output": ["ParseError", ["StartTag", "a", {"'": ""}]]}, |
849 |
|
|
|
850 |
|
|
{"description": "<a ''>", |
851 |
|
|
"input": "<a ''>", |
852 |
|
|
"output": ["ParseError", "ParseError", ["StartTag", "a", {"''": ""}]]}, |
853 |
|
|
|
854 |
|
|
{"description": "<a a\">", |
855 |
|
|
"input": "<a a\">", |
856 |
|
|
"output": ["ParseError", ["StartTag", "a", {"a\"": ""}]]}, |
857 |
|
|
|
858 |
|
|
{"description": "<a a'>", |
859 |
|
|
"input": "<a a'>", |
860 |
|
|
"output": ["ParseError", ["StartTag", "a", {"a'": ""}]]}, |
861 |
|
|
|
862 |
|
|
{"description": "<a a\"'>", |
863 |
|
|
"input": "<a a\"'>", |
864 |
|
|
"output": ["ParseError", "ParseError", ["StartTag", "a", {"a\"'": ""}]]}, |
865 |
|
|
|
866 |
|
|
{"description": "<a a=\">", |
867 |
|
|
"input": "<a a=\">", |
868 |
|
|
"output": ["ParseError", ["StartTag", "a", {"a": ">"}]]}, |
869 |
|
|
|
870 |
|
|
{"description": "<a a='>", |
871 |
|
|
"input": "<a a='>", |
872 |
|
|
"output": ["ParseError", ["StartTag", "a", {"a": ">"}]]}, |
873 |
|
|
|
874 |
|
|
{"description": "<a a=a\">", |
875 |
|
|
"input": "<a a=a\">", |
876 |
|
|
"output": ["ParseError", ["StartTag", "a", {"a": "a\""}]]}, |
877 |
|
|
|
878 |
|
|
{"description": "<a a=a'>", |
879 |
|
|
"input": "<a a=a'>", |
880 |
|
|
"output": ["ParseError", ["StartTag", "a", {"a": "a'"}]]}, |
881 |
|
|
|
882 |
|
|
{"description": "<a a=>", |
883 |
|
|
"input": "<a a=>", |
884 |
wakaba |
1.25 |
"output": ["ParseError", ["StartTag", "a", {"a": ""}]]}, |
885 |
wakaba |
1.21 |
|
886 |
|
|
{"description": "end tag attribute (before attribute, >)", |
887 |
|
|
"input": "</p class=\"\" >", |
888 |
|
|
"output": ["ParseError", ["EndTag", "p"]]}, |
889 |
|
|
|
890 |
|
|
{"description": "end tag attribute (before attribute, EOF)", |
891 |
|
|
"input": "</p class=\"\" ", |
892 |
|
|
"output": ["ParseError", "ParseError", ["EndTag", "p"]]}, |
893 |
|
|
|
894 |
|
|
{"description": "end tag not closed (before attribute)", |
895 |
|
|
"input": "</p >", |
896 |
|
|
"output": [["EndTag", "p"]]}, |
897 |
|
|
|
898 |
|
|
{"description": "end tag not closed (attribute name)", |
899 |
|
|
"input": "</p class", |
900 |
|
|
"output": ["ParseError", "ParseError", ["EndTag", "p"]]}, |
901 |
|
|
|
902 |
|
|
{"description": "end tag attribute (after attribute name)", |
903 |
|
|
"input": "</p class >", |
904 |
|
|
"output": ["ParseError", ["EndTag", "p"]]}, |
905 |
|
|
|
906 |
|
|
{"description": "end tag attributes uc (after attribute name)", |
907 |
|
|
"input": "</p class Title>", |
908 |
|
|
"output": ["ParseError", ["EndTag", "p"]]}, |
909 |
|
|
|
910 |
|
|
{"description": "end tag attributes lc (after attribute name)", |
911 |
|
|
"input": "</p class title>", |
912 |
|
|
"output": ["ParseError", ["EndTag", "p"]]}, |
913 |
|
|
|
914 |
|
|
{"description": "end tag not closed (after attribute name)", |
915 |
|
|
"input": "</p class ", |
916 |
|
|
"output": ["ParseError", "ParseError", ["EndTag", "p"]]}, |
917 |
|
|
|
918 |
|
|
{"description": "end tag attribute (before attribute value)", |
919 |
|
|
"input": "</p class=>", |
920 |
wakaba |
1.25 |
"output": ["ParseError", "ParseError", ["EndTag", "p"]]}, |
921 |
wakaba |
1.21 |
|
922 |
|
|
{"description": "end tag not closed (before attribute value)", |
923 |
|
|
"input": "</p class=", |
924 |
|
|
"output": ["ParseError", "ParseError", ["EndTag", "p"]]}, |
925 |
|
|
|
926 |
|
|
{"description": "end tag not closed (attribute value double quote)", |
927 |
|
|
"input": "</p class=\"", |
928 |
|
|
"output": ["ParseError", "ParseError", ["EndTag", "p"]]}, |
929 |
|
|
|
930 |
|
|
{"description": "end tag not closed (attribute value single quote)", |
931 |
|
|
"input": "</p class='", |
932 |
|
|
"output": ["ParseError", "ParseError", ["EndTag", "p"]]}, |
933 |
|
|
|
934 |
|
|
{"description": "end tag attribute (attribute value unquoted)", |
935 |
|
|
"input": "</p class=a>", |
936 |
|
|
"output": ["ParseError", ["EndTag", "p"]]}, |
937 |
|
|
|
938 |
|
|
{"description": "end tag not closed (attribute value unquoted)", |
939 |
|
|
"input": "</p class=a", |
940 |
|
|
"output": ["ParseError", "ParseError", ["EndTag", "p"]]}, |
941 |
|
|
|
942 |
|
|
{"description": "end tag attribute (after attribute value double quoted)", |
943 |
|
|
"input": "</p class=\"a\" >", |
944 |
|
|
"output": ["ParseError", ["EndTag", "p"]]}, |
945 |
|
|
|
946 |
|
|
{"description": "end tag attribute (after attribute value single quoted)", |
947 |
|
|
"input": "</p class='a' >", |
948 |
|
|
"output": ["ParseError", ["EndTag", "p"]]}, |
949 |
|
|
|
950 |
|
|
{"description": "end tag not closed (after attribute value double quoted)", |
951 |
|
|
"input": "</p class=\"a\" ", |
952 |
|
|
"output": ["ParseError", "ParseError", ["EndTag", "p"]]}, |
953 |
|
|
|
954 |
|
|
{"description": "end tag not closed (after attribute value single quoted)", |
955 |
|
|
"input": "</p class='a' ", |
956 |
wakaba |
1.23 |
"output": ["ParseError", "ParseError", ["EndTag", "p"]]}, |
957 |
|
|
|
958 |
|
|
{"description": "start tag not closed (after attribute value (quoted))", |
959 |
|
|
"input": "<p class='a'", |
960 |
|
|
"output": ["ParseError", ["StartTag", "p", {"class": "a"}]]}, |
961 |
|
|
|
962 |
|
|
{"description": "end tag not closed (after attribute value (quoted))", |
963 |
|
|
"input": "</p class='a'", |
964 |
|
|
"output": ["ParseError", "ParseError", ["EndTag", "p"]]}, |
965 |
|
|
|
966 |
|
|
{"description": "start tag not closed (self-closing start tag)", |
967 |
|
|
"input": "<p class='a'/", |
968 |
|
|
"output": ["ParseError", ["StartTag", "p", {"class": "a"}]]}, |
969 |
|
|
|
970 |
|
|
{"description": "end tag not closed (self-closing start tag)", |
971 |
|
|
"input": "</p/", |
972 |
|
|
"output": ["ParseError", ["EndTag", "p"]]}, |
973 |
|
|
|
974 |
|
|
{"description": "end tag not closed (self-closing start tag)", |
975 |
|
|
"input": "</p class='a'/", |
976 |
wakaba |
1.21 |
"output": ["ParseError", "ParseError", ["EndTag", "p"]]} |
977 |
wakaba |
1.23 |
|
978 |
|
|
|
979 |
wakaba |
1.4 |
|
980 |
|
|
]} |