out += "\"";
}
- void anyTagEnd(const char *name)
+ void anyTagEnd(const char *name, int close_it)
{
+ if (close_it)
+ out += "/";
out += ">";
}
mp::HTMLParser hp;
const char* html =
"<html><body><a t1=v1 t2='v2' t3=\"v3\">some text</a>"
- "<hr><table ></table ></body></html";
+ "<hr><table ></table ><a href=\"x\"/></body></html>";
const char* expected =
"<html><body><a t1=\"v1\" t2=\"v2\" t3=\"v3\">some text</a>"
- "<hr><table></table></body></html";
+ "<hr><table></table><a href=\"x\"/></body></html>";
MyEvent e;
hp.parse(e, html);
+
+ std::cout << expected << std::endl;
+ std::cout << e.out << std::endl;
BOOST_CHECK_EQUAL(std::string(expected), e.out);
}
catch (std::exception & e)