Text and comment nodes are stored plain and must be escaped for XML

This commit is contained in:
David Wendt 2019-12-28 15:08:31 -07:00
parent c7e1f34a5d
commit 0c7a1fe667
1 changed files with 2 additions and 2 deletions

View File

@ -1060,10 +1060,10 @@ impl<'gc> XMLNode<'gc> {
}
}
XMLNodeData::Text { contents, .. } => {
writer.write_event(&Event::Text(BytesText::from_escaped_str(contents.as_str())))
writer.write_event(&Event::Text(BytesText::from_plain_str(contents.as_str())))
}
XMLNodeData::Comment { contents, .. } => writer.write_event(&Event::Comment(
BytesText::from_escaped_str(contents.as_str()),
BytesText::from_plain_str(contents.as_str()),
)),
}?;