Sync with latest HTML5lib and latest Maruku

This commit is contained in:
Jacques Distler 2007-07-04 17:36:59 -05:00
parent 8e92e4a3ab
commit 8ccaad85a5
71 changed files with 1974 additions and 1621 deletions

View file

@ -33,7 +33,6 @@ EUC-jp
#encoding
EUC-jp
#data
<!-- -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View file

@ -92,7 +92,8 @@
{"description": "rcdata",
"input": [["StartTag", "script", {}], ["Characters", "a<b>c&d"]],
"expected": ["<script>a<b>c&d"]
"expected": ["<script>a<b>c&d"],
"xhtml": ["<script>a&lt;b&gt;c&amp;d"]
},
{"description": "doctype",

View file

@ -49,6 +49,12 @@
"options": {"escape_lt_in_attrs": true},
"input": [["StartTag", "a", {"title": "a<b>c&d"}]],
"expected": ["<a title=\"a&lt;b>c&amp;d\">"]
},
{"description": "rcdata",
"options": {"escape_rcdata": true},
"input": [["StartTag", "script", {}], ["Characters", "a<b>c&d"]],
"expected": ["<script>a&lt;b&gt;c&amp;d"]
}
]}

View file

@ -135,7 +135,7 @@
{"description":"Entity without trailing semicolon (2)",
"input":"I'm &notin",
"output":[["Character","I'm "], "ParseError", ["Character", ""]]},
"output":[["Character","I'm "], "ParseError", ["Character", "¬in"]]},
{"description":"Partial entity match at end of file",
"input":"I'm &no",
@ -151,6 +151,18 @@
{"description":"Hexadecimal entity in attribute",
"input":"<h a='&#x3f;'></h>",
"output":[["StartTag", "h", {"a":"?"}], ["EndTag", "h"]]}
"output":[["StartTag", "h", {"a":"?"}], ["EndTag", "h"]]},
{"description":"Entity in attribute without semicolon ending in x",
"input":"<h a='&notx'>",
"output":["ParseError", ["StartTag", "h", {"a":"&notx"}]]},
{"description":"Entity in attribute without semicolon ending in 1",
"input":"<h a='&not1'>",
"output":["ParseError", ["StartTag", "h", {"a":"&not1"}]]},
{"description":"Entity in attribute without semicolon",
"input":"<h a='&COPY'>",
"output":["ParseError", ["StartTag", "h", {"a":"©"}]]}
]}

View file

@ -42,19 +42,23 @@
{"description":"Numeric entity representing the NUL character",
"input":"&#0000;",
"output":[["Character", "\uFFFD"]]},
"output":["ParseError", ["Character", "\uFFFD"]]},
{"description":"Hexadecimal entity representing the NUL character",
"input":"&#x0000;",
"output":[["Character", "\uFFFD"]]},
"output":["ParseError", ["Character", "\uFFFD"]]},
{"description":"Numeric entity representing a codepoint after 1114111 (U+10FFFF)",
"input":"&#2225222;",
"output":[["Character", "\uFFFD"]]},
"output":["ParseError", ["Character", "\uFFFD"]]},
{"description":"Hexadecimal entity representing a codepoint after 1114111 (U+10FFFF)",
"input":"&#x1010FFFF;",
"output":[["Character", "\uFFFD"]]},
"output":["ParseError", ["Character", "\uFFFD"]]},
{"description":"Hexadecimal entity pair representing a surrogate pair",
"input":"&#xD869;&#xDED6;",
"output":["ParseError", ["Character", "\uFFFD"], "ParseError", ["Character", "\uFFFD"]]},
{"description":"Numeric entity representing a Windows-1252 'codepoint'",
"input":"&#137;",
@ -118,7 +122,7 @@
{"description":"Null Byte Replacement",
"input":"\u0000",
"output":[["Character", "\ufffd"]]}
"output":["ParseError", ["Character", "\ufffd"]]}
]}

View file

@ -285,6 +285,7 @@ Line1<br>Line2<br>Line3<br>Line4
| <div>
| <b>
| <marquee>
| <p>
| "X"
#data
@ -330,6 +331,7 @@ Unexpected end of file
| <body>
| <p>
| <hr>
| <p>
#data
<select><b><option><select><option></b></select>X
@ -1369,13 +1371,14 @@ unexpected EOF
<head></p><meta><p>
#errors
6: missing document type declaration
10: unexpected p element end tag in head
10: unexpected p element end tag
#document
| <html>
| <head>
| <meta>
| <body>
| <p>
| <meta>
| <p>
#data
<head></html><meta><p>
@ -1485,6 +1488,7 @@ unexpected EOF
| <div>
| <b>
| <marquee>
| <p>
#data
<script></script></div><title></title><p><p>
@ -1511,6 +1515,7 @@ unexpected EOF
| <body>
| <p>
| <hr>
| <p>
#data
<select><b><option><select><option></b></select>
@ -1807,6 +1812,7 @@ Unexpected EOF
| <head>
| <body>
| <br>
| <p>
#data
<table><tr></strong></b></em></i></u></strike></s></blink></tt></pre></big></small></font></select></h1></h2></h3></h4></h5></h6></body></br></a></img></title></span></style></script></table></th></td></tr></frame></area></link></param></hr></input></col></base></meta></basefont></bgsound></embed></spacer></p></dd></dt></caption></colgroup></tbody></tfoot></thead></address></blockquote></center></dir></div></dl></fieldset></listing></menu></ol></ul></li></nobr></wbr></form></button></marquee></object></html></frameset></head></iframe></image></isindex></noembed></noframes></noscript></optgroup></option></plaintext></textarea>
@ -1928,3 +1934,4 @@ Unexpected EOF
| <table>
| <tbody>
| <tr>
| <p>

View file

@ -777,3 +777,4 @@ Unexpected </p> end tag.
| <tbody>
| <tr>
| <td>
| <p>

View file

@ -61,7 +61,6 @@ No DOCTYPE
#data
<!DOCTYPE htML><html><head></head><body><pre>
foo</pre></body></html>
#errors
#document
@ -72,10 +71,22 @@ foo</pre></body></html>
| <pre>
| "foo"
#data
<!DOCTYPE htML><html><head></head><body><pre>
foo</pre></body></html>
#errors
#document
| <!DOCTYPE htML>
| <html>
| <head>
| <body>
| <pre>
| "
foo"
#data
<!DOCTYPE htML><html><head></head><body><pre>
foo
</pre></body></html>
#errors
@ -183,7 +194,6 @@ y</pre></body></html>
#data
<!DOCTYPE htML><textarea>
foo</textarea>
#errors
#document
@ -194,6 +204,20 @@ foo</textarea>
| <textarea>
| "foo"
#data
<!DOCTYPE htML><textarea>
foo</textarea>
#errors
#document
| <!DOCTYPE htML>
| <html>
| <head>
| <body>
| <textarea>
| "
foo"
#data
<!DOCTYPE htML><html><head></head><body><ul><li><div><p><li></ul></body></html>
#errors

View file

@ -1,37 +1,49 @@
#data
direct div content
#errors
#document-fragment div
#document-fragment
div
#document
| "direct div content"
#data
direct textarea content
#errors
#document-fragment textarea
#document-fragment
textarea
#document
| "direct textarea content"
#data
textarea content with <em>pseudo</em> <foo>markup
#errors
#document-fragment textarea
#document-fragment
textarea
#document
| "textarea content with <em>pseudo</em> <foo>markup"
#data
this is &#x0043;DATA inside a <style> element
#errors
#document-fragment style
#document-fragment
style
#document
| "this is &#x0043;DATA inside a <style> element"
#data
</plaintext>
#errors
#document-fragment plaintext
#document-fragment
plaintext
#document
| "</plaintext>"
#data
setting html's innerHTML
#errors
#document-fragment html
#document-fragment
html
#document
| <head>
| <body>
| "setting html's innerHTML"
@ -39,6 +51,8 @@ setting html's innerHTML
#data
<title>setting head's innerHTML</title>
#errors
#document-fragment head
#document-fragment
head
#document
| <title>
| "setting head's innerHTML"

View file

@ -27,3 +27,41 @@
| <head>
| <body>
| <meta>
#data
<!doctype HTml><form><div></form><div>
#errors
Form end tag ignored.
Unexpected end of file.
#document
| <!DOCTYPE HTml>
| <html>
| <head>
| <body>
| <form>
| <div>
| <div>
#data
<!doctype HTml><title>&amp;</title>
#errors
Unexpected end of file.
#document
| <!DOCTYPE HTml>
| <html>
| <head>
| <title>
| "&"
| <body>
#data
<!doctype HTml><title><!--&amp;--></title>
#errors
Unexpected end of file.
#document
| <!DOCTYPE HTml>
| <html>
| <head>
| <title>
| "<!--&amp;-->"
| <body>