a47f18
diff --git a/parser/expat/lib/xmlparse.c b/parser/expat/lib/xmlparse.c
a47f18
--- a/parser/expat/lib/xmlparse.c
a47f18
+++ b/parser/expat/lib/xmlparse.c
a47f18
@@ -5652,12 +5652,18 @@
a47f18
   else
a47f18
 #endif /* XML_DTD */
a47f18
   {
a47f18
     processor = contentProcessor;
a47f18
     /* see externalEntityContentProcessor vs contentProcessor */
a47f18
-    return doContent(parser, parentParser ? 1 : 0, encoding, s, end,
a47f18
-                     nextPtr, (XML_Bool)!ps_finalBuffer);
a47f18
+    result = doContent(parser, parser->m_parentParser ? 1 : 0,
a47f18
+                       parser->m_encoding, s, end, nextPtr,
a47f18
+                       (XML_Bool)! parser->m_parsingStatus.finalBuffer);
a47f18
+    if (result == XML_ERROR_NONE) {
a47f18
+      if (! storeRawNames(parser))
a47f18
+        return XML_ERROR_NO_MEMORY;
a47f18
+    }
a47f18
+    return result;
a47f18
   }
a47f18
 }
a47f18
 
a47f18
 static enum XML_Error PTRCALL
a47f18
 errorProcessor(XML_Parser parser,
a47f18