htmlparser icon indicating copy to clipboard operation
htmlparser copied to clipboard

title is not being converted to HTML format

Open testmigrator opened this issue 3 years ago • 0 comments

the to_html method is not handling the title tag properly, and there are similar issues with other tags such as iframe.

TEST(test, handlesKnownEmptyTitle){
    string h = "<html><head><title /><meta name=foo></head><body>One</body></html>";
    parser parse;
    node_ptr doc = parse.parse(h);

    //<html><head><title></title><meta name=\"foo\"></head><body>One</body></html>
    ASSERT_EQ("<html>\n\t<head>\n\t\t<title />\n\t\t<meta name=\"foo\" />\n\t</head>\n\t<body>One</body>\n</html>", doc->to_html());
}

testmigrator avatar Apr 11 '23 08:04 testmigrator