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