Escape ClipBase.Hash when writing XML

Some YCDs have special characters in the clip hash, which causes
the XML to be invalid.
This commit is contained in:
alexguirre 2023-09-03 11:07:10 +02:00
parent 023cc1eb47
commit 7542dabb71

View File

@ -3151,7 +3151,7 @@ namespace CodeWalker.GameFiles
public virtual void WriteXml(StringBuilder sb, int indent)
{
YcdXml.StringTag(sb, indent, "Hash", YcdXml.HashString(Hash));
YcdXml.StringTag(sb, indent, "Hash", MetaXml.XmlEscape(YcdXml.HashString(Hash)));
YcdXml.StringTag(sb, indent, "Name", MetaXml.XmlEscape(Name));
YcdXml.ValueTag(sb, indent, "Type", Type.ToString());
YcdXml.ValueTag(sb, indent, "Unknown30", Unknown_30h.ToString());