mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 02:37:42 +00:00
LibXML: Actually append resolved references when parsing content
This commit is contained in:
parent
f25745ed27
commit
2f7527b0a4
2 changed files with 13 additions and 1 deletions
|
@ -29,3 +29,15 @@ TEST_CASE(character_reference_integer_overflow)
|
|||
return Test::Crash::Failure::DidNotCrash;
|
||||
});
|
||||
}
|
||||
|
||||
TEST_CASE(predefined_character_reference)
|
||||
{
|
||||
XML::Parser parser("<a>Well hello &, <, >, ', and "!</a>"sv);
|
||||
auto document = MUST(parser.parse());
|
||||
|
||||
auto const& node = document.root().content.get<XML::Node::Element>();
|
||||
EXPECT_EQ(node.name, "a");
|
||||
|
||||
auto const& content = node.children[0]->content.get<XML::Node::Text>();
|
||||
EXPECT_EQ(content.builder.string_view(), "Well hello &, <, >, ', and \"!");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue