Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pandas/io/formats/xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ def _transform_doc(self) -> bytes:
)

with preprocess_data(handle_data) as xml_data:
curr_parser = XMLParser(encoding=self.encoding)
curr_parser = XMLParser(encoding=self.encoding, resolve_entities=False)

if isinstance(xml_data, io.StringIO):
xsl_doc = fromstring(
Expand Down
2 changes: 1 addition & 1 deletion pandas/io/xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ def _parse_doc(
)

with preprocess_data(handle_data) as xml_data:
curr_parser = XMLParser(encoding=self.encoding)
curr_parser = XMLParser(encoding=self.encoding, resolve_entities=False)

if isinstance(xml_data, io.StringIO):
if self.encoding is None:
Expand Down