3 {"description": "quote_char=\"'\"",
4 "options": {"quote_char": "'"},
5 "input": [["StartTag", "http://www.w3.org/1999/xhtml", "span", [{"namespace": null, "name": "title", "value": "test 'with' quote_char"}]]],
6 "expected": ["<span title='test 'with' quote_char'>"]
9 {"description": "quote_attr_values=true",
10 "options": {"quote_attr_values": true},
11 "input": [["StartTag", "http://www.w3.org/1999/xhtml", "button", [{"namespace": null, "name": "disabled", "value" :"disabled"}]]],
12 "expected": ["<button disabled>"],
13 "xhtml": ["<button disabled=\"disabled\">"]
16 {"description": "quote_attr_values=true with irrelevant",
17 "options": {"quote_attr_values": true},
18 "input": [["StartTag", "http://www.w3.org/1999/xhtml", "div", [{"namespace": null, "name": "irrelevant", "value" :"irrelevant"}]]],
19 "expected": ["<div irrelevant>"],
20 "xhtml": ["<div irrelevant=\"irrelevant\">"]
23 {"description": "use_trailing_solidus=true with void element",
24 "options": {"use_trailing_solidus": true},
25 "input": [["EmptyTag", "img", {}]],
26 "expected": ["<img />"]
29 {"description": "use_trailing_solidus=true with non-void element",
30 "options": {"use_trailing_solidus": true},
31 "input": [["StartTag", "http://www.w3.org/1999/xhtml", "div", {}]],
35 {"description": "minimize_boolean_attributes=false",
36 "options": {"minimize_boolean_attributes": false},
37 "input": [["StartTag", "http://www.w3.org/1999/xhtml", "div", [{"namespace": null, "name": "irrelevant", "value" :"irrelevant"}]]],
38 "expected": ["<div irrelevant=irrelevant>"],
39 "xhtml": ["<div irrelevant=\"irrelevant\">"]
42 {"description": "minimize_boolean_attributes=false with empty value",
43 "options": {"minimize_boolean_attributes": false},
44 "input": [["StartTag", "http://www.w3.org/1999/xhtml", "div", [{"namespace": null, "name": "irrelevant", "value" :""}]]],
45 "expected": ["<div irrelevant=\"\">"]
48 {"description": "escape less than signs in attribute values",
49 "options": {"escape_lt_in_attrs": true},
50 "input": [["StartTag", "http://www.w3.org/1999/xhtml", "a", [{"namespace": null, "name": "title", "value": "a<b>c&d"}]]],
51 "expected": ["<a title=\"a<b>c&d\">"]
54 {"description": "rcdata",
55 "options": {"escape_rcdata": true},
56 "input": [["StartTag", "http://www.w3.org/1999/xhtml", "script", {}], ["Characters", "a<b>c&d"]],
57 "expected": ["<script>a<b>c&d"]