{"tests": [ {"description": "proper attribute value escaping", "input": [["StartTag", "http://www.w3.org/1999/xhtml", "span", [{"namespace": null, "name": "title", "value": "test \"with\" ""}]]], "expected": [""] }, {"description": "proper attribute value non-quoting", "input": [["StartTag", "http://www.w3.org/1999/xhtml", "span", [{"namespace": null, "name": "title", "value": "foo"}]]], "expected": [""], "xhtml": [""] }, {"description": "proper attribute value non-quoting (with <)", "input": [["StartTag", "http://www.w3.org/1999/xhtml", "span", [{"namespace": null, "name": "title", "value": "foo"], "xhtml": [""] }, {"description": "proper attribute value quoting (with =)", "input": [["StartTag", "http://www.w3.org/1999/xhtml", "span", [{"namespace": null, "name": "title", "value": "foo=bar"}]]], "expected": [""] }, {"description": "proper attribute value quoting (with >)", "input": [["StartTag", "http://www.w3.org/1999/xhtml", "span", [{"namespace": null, "name": "title", "value": "foo>bar"}]]], "expected": ["bar\">"] }, {"description": "proper attribute value quoting (with \")", "input": [["StartTag", "http://www.w3.org/1999/xhtml", "span", [{"namespace": null, "name": "title", "value": "foo\"bar"}]]], "expected": [""] }, {"description": "proper attribute value quoting (with ')", "input": [["StartTag", "http://www.w3.org/1999/xhtml", "span", [{"namespace": null, "name": "title", "value": "foo'bar"}]]], "expected": [""] }, {"description": "proper attribute value quoting (with both \" and ')", "input": [["StartTag", "http://www.w3.org/1999/xhtml", "span", [{"namespace": null, "name": "title", "value": "foo'bar\"baz"}]]], "expected": [""] }, {"description": "proper attribute value quoting (with space)", "input": [["StartTag", "http://www.w3.org/1999/xhtml", "span", [{"namespace": null, "name": "title", "value": "foo bar"}]]], "expected": [""] }, {"description": "proper attribute value quoting (with tab)", "input": [["StartTag", "http://www.w3.org/1999/xhtml", "span", [{"namespace": null, "name": "title", "value": "foo\tbar"}]]], "expected": [""] }, {"description": "proper attribute value quoting (with LF)", "input": [["StartTag", "http://www.w3.org/1999/xhtml", "span", [{"namespace": null, "name": "title", "value": "foo\nbar"}]]], "expected": [""] }, {"description": "proper attribute value quoting (with CR)", "input": [["StartTag", "http://www.w3.org/1999/xhtml", "span", [{"namespace": null, "name": "title", "value": "foo\rbar"}]]], "expected": [""] }, {"description": "proper attribute value non-quoting (with linetab)", "input": [["StartTag", "http://www.w3.org/1999/xhtml", "span", [{"namespace": null, "name": "title", "value": "foo\u000Bbar"}]]], "expected": [""], "xhtml": [""] }, {"description": "proper attribute value quoting (with form feed)", "input": [["StartTag", "http://www.w3.org/1999/xhtml", "span", [{"namespace": null, "name": "title", "value": "foo\u000Cbar"}]]], "expected": [""] }, {"description": "void element (as EmptyTag token)", "input": [["EmptyTag", "img", {}]], "expected": [""], "xhtml": [""] }, {"description": "void element (as StartTag token)", "input": [["StartTag", "http://www.w3.org/1999/xhtml", "img", {}]], "expected": [""], "xhtml": [""] }, {"description": "doctype in error", "input": [["Doctype", "foo"]], "expected": [""] }, {"description": "character data", "options": {"encoding":"utf-8"}, "input": [["Characters", "ac&d"]], "expected": ["a<b>c&d"] }, {"description": "rcdata", "input": [["StartTag", "http://www.w3.org/1999/xhtml", "script", {}], ["Characters", "ac&d"]], "expected": ["