aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs3
-rw-r--r--OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs7
2 files changed, 6 insertions, 4 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index c14ce1e..dde54d5 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -37,6 +37,7 @@ using OpenMetaverse;
37using OpenMetaverse.Packets; 37using OpenMetaverse.Packets;
38using log4net; 38using log4net;
39using OpenSim.Framework; 39using OpenSim.Framework;
40using OpenSim.Framework.Serialization.External;
40using OpenSim.Region.Framework; 41using OpenSim.Region.Framework;
41using OpenSim.Framework.Client; 42using OpenSim.Framework.Client;
42using OpenSim.Region.Framework.Interfaces; 43using OpenSim.Region.Framework.Interfaces;
@@ -2225,7 +2226,7 @@ namespace OpenSim.Region.Framework.Scenes
2225 bbox = Vector3.Zero; 2226 bbox = Vector3.Zero;
2226 offsetHeight = 0; 2227 offsetHeight = 0;
2227 2228
2228 string xmlData = Utils.BytesToString(assetData); 2229 string xmlData = ExternalRepresentationUtils.SanitizeXml(Utils.BytesToString(assetData));
2229 2230
2230 try 2231 try
2231 { 2232 {
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 {