Open testmigrator opened 1 year ago
The expected value of els[0]->GetValue() is not returned, when handling escaped script, which leads to incorrect parsing.
TEST(test, handlesEscapedScript) { HtmlParser parser; shared_ptr<HtmlDocument> doc = parser.Parse("<html><script><!-- one <script>Blah</script> --></script></html>"); vector<shared_ptr<HtmlElement>> els = doc->SelectElement("//script"); ASSERT_EQ(1, els.size()); // <!-- one <script>Blah // ASSERT_EQ("<!-- one <script>Blah</script> -->", els[0]->GetValue()); }
The expected value of els[0]->GetValue() is not returned, when handling escaped script, which leads to incorrect parsing.