Skip to content

Commit 85c968a

Browse files
Escape angle brackets in serializer attribute tests
Fixes #191.
1 parent 8f43b7e commit 85c968a

2 files changed

Lines changed: 11 additions & 11 deletions

File tree

serializer/core.test

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,21 @@
1111
"xhtml": ["<span title=\"foo\">"]
1212
},
1313

14-
{"description": "proper attribute value non-quoting (with <)",
15-
"input": [["StartTag", "http://www.w3.org/1999/xhtml", "span", [{"namespace": null, "name": "title", "value": "foo<bar"}]]],
16-
"expected": ["<span title=foo<bar>"],
17-
"xhtml": ["<span title=\"foo&lt;bar\">"]
18-
},
14+
{"description": "proper attribute value non-quoting (with <)",
15+
"input": [["StartTag", "http://www.w3.org/1999/xhtml", "span", [{"namespace": null, "name": "title", "value": "foo<bar"}]]],
16+
"expected": ["<span title=foo&lt;bar>"],
17+
"xhtml": ["<span title=\"foo&lt;bar\">"]
18+
},
1919

2020
{"description": "proper attribute value quoting (with =)",
2121
"input": [["StartTag", "http://www.w3.org/1999/xhtml", "span", [{"namespace": null, "name": "title", "value": "foo=bar"}]]],
2222
"expected": ["<span title=\"foo=bar\">"]
2323
},
2424

25-
{"description": "proper attribute value quoting (with >)",
26-
"input": [["StartTag", "http://www.w3.org/1999/xhtml", "span", [{"namespace": null, "name": "title", "value": "foo>bar"}]]],
27-
"expected": ["<span title=\"foo>bar\">"]
28-
},
25+
{"description": "proper attribute value quoting (with >)",
26+
"input": [["StartTag", "http://www.w3.org/1999/xhtml", "span", [{"namespace": null, "name": "title", "value": "foo>bar"}]]],
27+
"expected": ["<span title=\"foo&gt;bar\">"]
28+
},
2929

3030
{"description": "proper attribute value quoting (with \")",
3131
"input": [["StartTag", "http://www.w3.org/1999/xhtml", "span", [{"namespace": null, "name": "title", "value": "foo\"bar"}]]],

serializer/options.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@
4545
"expected": ["<div irrelevant=\"\">"]
4646
},
4747

48-
{"description": "escape less than signs in attribute values",
48+
{"description": "escape angle brackets in attribute values",
4949
"options": {"escape_lt_in_attrs": true},
5050
"input": [["StartTag", "http://www.w3.org/1999/xhtml", "a", [{"namespace": null, "name": "title", "value": "a<b>c&d"}]]],
51-
"expected": ["<a title=\"a&lt;b>c&amp;d\">"]
51+
"expected": ["<a title=\"a&lt;b&gt;c&amp;d\">"]
5252
},
5353

5454
{"description": "rcdata",

0 commit comments

Comments
 (0)