|
3 | 3 | {
|
4 | 4 | "description":"CR in bogus comment state",
|
5 | 5 | "input":"<?\u000d",
|
6 |
| - "output":["ParseError", ["Comment", "?\u000a"]] |
| 6 | + "output":[["Comment", "?\u000a"]], |
| 7 | + "errors":[ |
| 8 | + { "code": "unexpected-question-mark-instead-of-tag-name", "line": 1, "col": 2 } |
| 9 | + ] |
7 | 10 | },
|
8 | 11 | {
|
9 | 12 | "description":"CRLF in bogus comment state",
|
10 | 13 | "input":"<?\u000d\u000a",
|
11 |
| - "output":["ParseError", ["Comment", "?\u000a"]] |
| 14 | + "output":[["Comment", "?\u000a"]], |
| 15 | + "errors":[ |
| 16 | + { "code": "unexpected-question-mark-instead-of-tag-name", "line": 1, "col": 2 } |
| 17 | + ] |
12 | 18 | },
|
13 | 19 | {
|
14 | 20 | "description":"CRLFLF in bogus comment state",
|
15 | 21 | "input":"<?\u000d\u000a\u000a",
|
16 |
| - "output":["ParseError", ["Comment", "?\u000a\u000a"]] |
| 22 | + "output":[["Comment", "?\u000a\u000a"]], |
| 23 | + "errors":[ |
| 24 | + { "code": "unexpected-question-mark-instead-of-tag-name", "line": 1, "col": 2 } |
| 25 | + ] |
17 | 26 | },
|
18 | 27 | {
|
19 |
| - "description":"NUL in RCDATA and RAWTEXT", |
| 28 | + "description":"NUL in RCDATA, RAWTEXT, PLAINTEXT and Script data", |
20 | 29 | "doubleEscaped":true,
|
21 |
| - "initialStates":["RCDATA state", "RAWTEXT state"], |
| 30 | + "initialStates":["RCDATA state", "RAWTEXT state", "PLAINTEXT state", "Script data state"], |
22 | 31 | "input":"\\u0000",
|
23 |
| - "output":["ParseError", ["Character", "\\uFFFD"]] |
| 32 | + "output":[["Character", "\\uFFFD"]], |
| 33 | + "errors":[ |
| 34 | + { "code": "unexpected-null-character", "line": 1, "col": 1 } |
| 35 | + ] |
| 36 | + }, |
| 37 | + { |
| 38 | + "description":"NUL in script HTML comment", |
| 39 | + "doubleEscaped":true, |
| 40 | + "initialStates":["Script data state"], |
| 41 | + "input":"<!--test\\u0000--><!--test-\\u0000--><!--test--\\u0000-->", |
| 42 | + "output":[["Character", "<!--test\\uFFFD--><!--test-\\uFFFD--><!--test--\\uFFFD-->"]], |
| 43 | + "errors":[ |
| 44 | + { "code": "unexpected-null-character", "line": 1, "col": 9 }, |
| 45 | + { "code": "unexpected-null-character", "line": 1, "col": 22 }, |
| 46 | + { "code": "unexpected-null-character", "line": 1, "col": 36 } |
| 47 | + ] |
| 48 | + }, |
| 49 | + { |
| 50 | + "description":"NUL in script HTML comment - double escaped", |
| 51 | + "doubleEscaped":true, |
| 52 | + "initialStates":["Script data state"], |
| 53 | + "input":"<!--<script>\\u0000--><!--<script>-\\u0000--><!--<script>--\\u0000-->", |
| 54 | + "output":[["Character", "<!--<script>\\uFFFD--><!--<script>-\\uFFFD--><!--<script>--\\uFFFD-->"]], |
| 55 | + "errors":[ |
| 56 | + { "code": "unexpected-null-character", "line": 1, "col": 13 }, |
| 57 | + { "code": "unexpected-null-character", "line": 1, "col": 30 }, |
| 58 | + { "code": "unexpected-null-character", "line": 1, "col": 48 } |
| 59 | + ] |
| 60 | + }, |
| 61 | + { |
| 62 | + "description":"EOF in script HTML comment", |
| 63 | + "initialStates":["Script data state"], |
| 64 | + "input":"<!--test", |
| 65 | + "output":[["Character", "<!--test"]], |
| 66 | + "errors":[ |
| 67 | + { "code": "eof-in-script-html-comment-like-text", "line": 1, "col": 9 } |
| 68 | + ] |
| 69 | + }, |
| 70 | + { |
| 71 | + "description":"EOF in script HTML comment after dash", |
| 72 | + "initialStates":["Script data state"], |
| 73 | + "input":"<!--test-", |
| 74 | + "output":[["Character", "<!--test-"]], |
| 75 | + "errors":[ |
| 76 | + { "code": "eof-in-script-html-comment-like-text", "line": 1, "col": 10 } |
| 77 | + ] |
| 78 | + }, |
| 79 | + { |
| 80 | + "description":"EOF in script HTML comment after dash dash", |
| 81 | + "initialStates":["Script data state"], |
| 82 | + "input":"<!--test--", |
| 83 | + "output":[["Character", "<!--test--"]], |
| 84 | + "errors":[ |
| 85 | + { "code": "eof-in-script-html-comment-like-text", "line": 1, "col": 11 } |
| 86 | + ] |
| 87 | + }, |
| 88 | + { |
| 89 | + "description":"EOF in script HTML comment double escaped after dash", |
| 90 | + "initialStates":["Script data state"], |
| 91 | + "input":"<!--<script>-", |
| 92 | + "output":[["Character", "<!--<script>-"]], |
| 93 | + "errors":[ |
| 94 | + { "code": "eof-in-script-html-comment-like-text", "line": 1, "col": 14 } |
| 95 | + ] |
| 96 | + }, |
| 97 | + { |
| 98 | + "description":"EOF in script HTML comment double escaped after dash dash", |
| 99 | + "initialStates":["Script data state"], |
| 100 | + "input":"<!--<script>--", |
| 101 | + "output":[["Character", "<!--<script>--"]], |
| 102 | + "errors":[ |
| 103 | + { "code": "eof-in-script-html-comment-like-text", "line": 1, "col": 15 } |
| 104 | + ] |
| 105 | + }, |
| 106 | + { |
| 107 | + "description":"EOF in script HTML comment - double escaped", |
| 108 | + "initialStates":["Script data state"], |
| 109 | + "input":"<!--<script>", |
| 110 | + "output":[["Character", "<!--<script>"]], |
| 111 | + "errors":[ |
| 112 | + { "code": "eof-in-script-html-comment-like-text", "line": 1, "col": 13 } |
| 113 | + ] |
24 | 114 | },
|
25 | 115 | {
|
26 | 116 | "description":"leading U+FEFF must pass through",
|
|
38 | 128 | "description":"Bad charref in in RCDATA",
|
39 | 129 | "initialStates":["RCDATA state"],
|
40 | 130 | "input":"&NotEqualTild;",
|
41 |
| - "output":["ParseError", ["Character", "&NotEqualTild;"]] |
| 131 | + "output":[["Character", "&NotEqualTild;"]], |
| 132 | + "errors":[ |
| 133 | + { "code": "unknown-named-character-reference", "line": 1, "col": 14 } |
| 134 | + ] |
42 | 135 | },
|
43 | 136 | {
|
44 | 137 | "description":"lowercase endtags in RCDATA and RAWTEXT",
|
|
84 | 177 | "description":"--!NUL in comment ",
|
85 | 178 | "doubleEscaped":true,
|
86 | 179 | "input":"<!----!\\u0000-->",
|
87 |
| - "output":["ParseError", "ParseError", ["Comment", "--!\\uFFFD"]] |
| 180 | + "output":[["Comment", "--!\\uFFFD"]], |
| 181 | + "errors":[ |
| 182 | + { "code": "unexpected-null-character", "line": 1, "col": 8 } |
| 183 | + ] |
88 | 184 | },
|
89 | 185 | {
|
90 | 186 | "description":"space EOF after doctype ",
|
91 | 187 | "input":"<!DOCTYPE html ",
|
92 |
| - "output":["ParseError", ["DOCTYPE", "html", null, null , false]] |
| 188 | + "output":[["DOCTYPE", "html", null, null , false]], |
| 189 | + "errors":[ |
| 190 | + { "code": "eof-in-doctype", "line": 1, "col": 16 } |
| 191 | + ] |
| 192 | + }, |
| 193 | + { |
| 194 | + "description":"CDATA in HTML content", |
| 195 | + "input":"<![CDATA[foo]]>", |
| 196 | + "output":[["Comment", "[CDATA[foo]]"]], |
| 197 | + "errors":[ |
| 198 | + { "code": "cdata-in-html-content", "line": 1, "col": 9 } |
| 199 | + ] |
| 200 | + }, |
| 201 | + { |
| 202 | + "description":"CDATA content", |
| 203 | + "input":"foo&bar", |
| 204 | + "initialStates":["CDATA section state"], |
| 205 | + "output":[["Character", "foo&bar"]], |
| 206 | + "errors":[ |
| 207 | + { "code": "eof-in-cdata", "line": 1, "col": 8 } |
| 208 | + ] |
93 | 209 | }
|
94 | 210 |
|
95 | 211 | ]
|
|
0 commit comments