mirror of
https://github.com/zeux/pugixml.git
synced 2024-12-26 21:04:25 +08:00
Fix gap collapsing during PCDATA parsing for fragment mode.
git-svn-id: https://pugixml.googlecode.com/svn/trunk@985 99668b35-9821-0410-8761-19e4c4f06640
This commit is contained in:
parent
bd960159dd
commit
934bddcfa6
@ -1903,6 +1903,8 @@ PUGI__NS_BEGIN
|
||||
}
|
||||
else if (*s == 0)
|
||||
{
|
||||
*g.flush(s) = 0;
|
||||
|
||||
return s;
|
||||
}
|
||||
else ++s;
|
||||
|
@ -975,3 +975,10 @@ TEST(parse_bom_fragment_invalid_utf32)
|
||||
CHECK_STRING(value, "\xef\xbf\xbf");
|
||||
#endif
|
||||
}
|
||||
|
||||
TEST(parse_pcdata_gap_fragment)
|
||||
{
|
||||
xml_document doc;
|
||||
CHECK(doc.load(STR("a&b"), parse_fragment | parse_escapes));
|
||||
CHECK_STRING(doc.text().get(), STR("a&b"));
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user