diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Serialization')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs index cb13ca4..463ef22 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs | |||
@@ -52,7 +52,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
52 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 52 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
53 | 53 | ||
54 | private static IUserManagement m_UserManagement; | 54 | private static IUserManagement m_UserManagement; |
55 | 55 | ||
56 | /// <summary> | 56 | /// <summary> |
57 | /// Deserialize a scene object from the original xml format | 57 | /// Deserialize a scene object from the original xml format |
58 | /// </summary> | 58 | /// </summary> |
@@ -60,7 +60,8 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
60 | /// <returns>The scene object deserialized. Null on failure.</returns> | 60 | /// <returns>The scene object deserialized. Null on failure.</returns> |
61 | public static SceneObjectGroup FromOriginalXmlFormat(string xmlData) | 61 | public static SceneObjectGroup FromOriginalXmlFormat(string xmlData) |
62 | { | 62 | { |
63 | using (XmlTextReader wrappedReader = new XmlTextReader(xmlData, XmlNodeType.Element, null)) | 63 | String fixedData = ExternalRepresentationUtils.SanitizeXml(xmlData); |
64 | using (XmlTextReader wrappedReader = new XmlTextReader(fixedData, XmlNodeType.Element, null)) | ||
64 | using (XmlReader reader = XmlReader.Create(wrappedReader, new XmlReaderSettings() { IgnoreWhitespace = true, ConformanceLevel = ConformanceLevel.Fragment })) | 65 | using (XmlReader reader = XmlReader.Create(wrappedReader, new XmlReaderSettings() { IgnoreWhitespace = true, ConformanceLevel = ConformanceLevel.Fragment })) |
65 | return FromOriginalXmlFormat(reader); | 66 | return FromOriginalXmlFormat(reader); |
66 | } | 67 | } |
@@ -322,7 +323,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
322 | List<SceneObjectGroup> sceneObjects = new List<SceneObjectGroup>(); | 323 | List<SceneObjectGroup> sceneObjects = new List<SceneObjectGroup>(); |
323 | CoalescedSceneObjects coa = null; | 324 | CoalescedSceneObjects coa = null; |
324 | 325 | ||
325 | string xmlData = Utils.BytesToString(data); | 326 | string xmlData = ExternalRepresentationUtils.SanitizeXml(Utils.BytesToString(data)); |
326 | 327 | ||
327 | if (CoalescedSceneObjectsSerializer.TryFromXml(xmlData, out coa)) | 328 | if (CoalescedSceneObjectsSerializer.TryFromXml(xmlData, out coa)) |
328 | { | 329 | { |