You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ProjectFileService.GetProjectFiles fails silently if it encounters invalid xml chars (like 0x1C, 0x1E, ...), resulting in an empty export file without any warning to the user
An easy fix would be to use XmlReaderSettings { CheckCharacters = false };
Instead of var xml = XDocument.Load(filePath, LoadOptions.PreserveWhitespace);
XDocument xml = null;
// avoid System.Xml.XmlException Message: '?', hexadecimal value 0x1C, 0x1E, ... is an invalid character.
XmlReaderSettings xmlReaderSettings = new XmlReaderSettings { CheckCharacters = false };
using (XmlReader xmlReader = XmlReader.Create(filePath, xmlReaderSettings))
{
xmlReader.MoveToContent();
xml = XDocument.Load(xmlReader, LoadOptions.PreserveWhitespace);
}
The text was updated successfully, but these errors were encountered:
Sdl-Community/StudioViews/StudioViews/Services/ProjectFileService.cs
Line 234 in 0244cb9
ProjectFileService.GetProjectFiles fails silently if it encounters invalid xml chars (like 0x1C, 0x1E, ...), resulting in an empty export file without any warning to the user
An easy fix would be to use XmlReaderSettings { CheckCharacters = false };
Instead of
var xml = XDocument.Load(filePath, LoadOptions.PreserveWhitespace);
The text was updated successfully, but these errors were encountered: