{ "tests": [ { "expected": [ "" ], "input": [ [ "StartTag", "http://www.w3.org/1999/xhtml", "head", {} ], [ "EndTag", "http://www.w3.org/1999/xhtml", "head" ] ], "description": "no encoding", "options": { "inject_meta_charset": true } }, { "expected": [ "" ], "input": [ [ "StartTag", "http://www.w3.org/1999/xhtml", "head", {} ], [ "EndTag", "http://www.w3.org/1999/xhtml", "head" ] ], "description": "empytag head", "options": { "encoding": "utf-8", "inject_meta_charset": true } }, { "expected": [ "foo" ], "input": [ [ "StartTag", "http://www.w3.org/1999/xhtml", "head", {} ], [ "StartTag", "http://www.w3.org/1999/xhtml", "title", {} ], [ "Characters", "foo" ], [ "EndTag", "http://www.w3.org/1999/xhtml", "title" ], [ "EndTag", "http://www.w3.org/1999/xhtml", "head" ] ], "description": "head w/title", "options": { "encoding": "utf-8", "inject_meta_charset": true } }, { "expected": [ "" ], "input": [ [ "StartTag", "http://www.w3.org/1999/xhtml", "head", {} ], [ "EmptyTag", "meta", [ { "namespace": null, "name": "charset", "value": "ascii" } ] ], [ "EndTag", "http://www.w3.org/1999/xhtml", "head" ] ], "description": "head w/meta-charset", "options": { "encoding": "utf-8", "inject_meta_charset": true } }, { "expected": [ "", "" ], "input": [ [ "StartTag", "http://www.w3.org/1999/xhtml", "head", {} ], [ "EmptyTag", "meta", [ { "namespace": null, "name": "charset", "value": "ascii" } ] ], [ "EmptyTag", "meta", [ { "namespace": null, "name": "charset", "value": "ascii" } ] ], [ "EndTag", "http://www.w3.org/1999/xhtml", "head" ] ], "description": "head w/ two meta-charset", "options": { "encoding": "utf-8", "inject_meta_charset": true } }, { "expected": [ "" ], "input": [ [ "StartTag", "http://www.w3.org/1999/xhtml", "head", {} ], [ "EmptyTag", "meta", [ { "namespace": null, "name": "name", "value": "robots" }, { "namespace": null, "name": "content", "value": "noindex" } ] ], [ "EndTag", "http://www.w3.org/1999/xhtml", "head" ] ], "description": "head w/robots", "options": { "encoding": "utf-8", "inject_meta_charset": true } }, { "expected": [ "" ], "input": [ [ "StartTag", "http://www.w3.org/1999/xhtml", "head", {} ], [ "EmptyTag", "meta", [ { "namespace": null, "name": "name", "value": "robots" }, { "namespace": null, "name": "content", "value": "noindex" } ] ], [ "EmptyTag", "meta", [ { "namespace": null, "name": "charset", "value": "ascii" } ] ], [ "EndTag", "http://www.w3.org/1999/xhtml", "head" ] ], "description": "head w/robots & charset", "options": { "encoding": "utf-8", "inject_meta_charset": true } }, { "expected": [ "" ], "input": [ [ "StartTag", "http://www.w3.org/1999/xhtml", "head", {} ], [ "EmptyTag", "meta", [ { "namespace": null, "name": "http-equiv", "value": "content-type" }, { "namespace": null, "name": "content", "value": "text/html; charset=ascii" } ] ], [ "EndTag", "http://www.w3.org/1999/xhtml", "head" ] ], "description": "head w/ charset in http-equiv content-type", "options": { "encoding": "utf-8", "inject_meta_charset": true } }, { "expected": [ "" ], "input": [ [ "StartTag", "http://www.w3.org/1999/xhtml", "head", {} ], [ "EmptyTag", "meta", [ { "namespace": null, "name": "name", "value": "robots" }, { "namespace": null, "name": "content", "value": "noindex" } ] ], [ "EmptyTag", "meta", [ { "namespace": null, "name": "http-equiv", "value": "content-type" }, { "namespace": null, "name": "content", "value": "text/html; charset=ascii" } ] ], [ "EndTag", "http://www.w3.org/1999/xhtml", "head" ] ], "description": "head w/robots & charset in http-equiv content-type", "options": { "encoding": "utf-8", "inject_meta_charset": true } } ] }