aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs23
1 files changed, 22 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
index 892403b..aa15422 100644
--- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
+++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
@@ -1361,7 +1361,28 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1361 1361
1362 private static void ProcessShpMedia(PrimitiveBaseShape shp, XmlReader reader) 1362 private static void ProcessShpMedia(PrimitiveBaseShape shp, XmlReader reader)
1363 { 1363 {
1364 string value = reader.ReadElementContentAsString("Media", String.Empty); 1364 string value = String.Empty;
1365 try
1366 {
1367 // The prominant format for MOAP is escaped XML (with > etc).
1368 // This is read as a string and passed to PrimitiveBaseShape which requires
1369 // its XML as a string (which it parses with its own XmlReader).
1370 value = reader.ReadElementContentAsString("Media", String.Empty);
1371 }
1372 catch (XmlException e)
1373 {
1374 // There are versions of OAR files that contain unquoted XML.
1375 try
1376 {
1377 m_log.WarnFormat("[SERIALIZER] MOAP specification in non-escaped XML format. Recovering.");
1378 value = reader.ReadInnerXml();
1379 }
1380 catch (Exception ee)
1381 {
1382 m_log.ErrorFormat("[SERIALIZER] Failed parsing of MOAP information");
1383 throw new XmlException("Failed parsing of MOAP media XML element");
1384 }
1385 }
1365 shp.Media = PrimitiveBaseShape.MediaList.FromXml(value); 1386 shp.Media = PrimitiveBaseShape.MediaList.FromXml(value);
1366 } 1387 }
1367 1388