0
0
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:
Arseny Kapoulkine 2014-02-23 19:28:27 +00:00
parent bd960159dd
commit 934bddcfa6
2 changed files with 9 additions and 0 deletions

View File

@ -1903,6 +1903,8 @@ PUGI__NS_BEGIN
}
else if (*s == 0)
{
*g.flush(s) = 0;
return s;
}
else ++s;

View File

@ -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"));
}