|
13 | 13 |
|
14 | 14 | import html5lib |
15 | 15 | from html5lib import constants |
| 16 | +from html5lib.filters.lint import Filter as Lint |
16 | 17 | from html5lib.serializer import HTMLSerializer, serialize |
17 | 18 | from html5lib.treewalkers._base import TreeWalker |
18 | 19 |
|
@@ -83,7 +84,7 @@ def _convertAttrib(self, attribs): |
83 | 84 |
|
84 | 85 | def serialize_html(input, options): |
85 | 86 | options = dict([(str(k), v) for k, v in options.items()]) |
86 | | - stream = JsonWalker(input) |
| 87 | + stream = Lint(JsonWalker(input), False) |
87 | 88 | serializer = HTMLSerializer(alphabetical_attributes=True, **options) |
88 | 89 | return serializer.render(stream, options.get("encoding", None)) |
89 | 90 |
|
@@ -125,9 +126,6 @@ def testCharacters(self): |
125 | 126 | def testStartTagName(self): |
126 | 127 | self.throwsWithLatin1([["StartTag", "http://www.w3.org/1999/xhtml", "\u0101", []]]) |
127 | 128 |
|
128 | | - def testEmptyTagName(self): |
129 | | - self.throwsWithLatin1([["EmptyTag", "http://www.w3.org/1999/xhtml", "\u0101", []]]) |
130 | | - |
131 | 129 | def testAttributeName(self): |
132 | 130 | self.throwsWithLatin1([["StartTag", "http://www.w3.org/1999/xhtml", "span", [{"namespace": None, "name": "\u0101", "value": "potato"}]]]) |
133 | 131 |
|
|
0 commit comments