mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-12-02 19:44:02 +08:00
#18484: Encoding xml local names during export
Work Item: 18484 --HG-- branch : 1.x
This commit is contained in:
@@ -3,6 +3,7 @@ using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Xml;
|
||||
using System.Xml.Linq;
|
||||
using Autofac;
|
||||
using NHibernate;
|
||||
@@ -564,7 +565,7 @@ namespace Orchard.ContentManagement {
|
||||
|
||||
var item = importContentSession.Get(identity);
|
||||
if (item == null) {
|
||||
item = New(element.Name.LocalName);
|
||||
item = New(XmlConvert.DecodeName(element.Name.LocalName));
|
||||
if (status != null && status.Value == "Draft") {
|
||||
Create(item, VersionOptions.Draft);
|
||||
}
|
||||
@@ -602,7 +603,7 @@ namespace Orchard.ContentManagement {
|
||||
}
|
||||
|
||||
public XElement Export(ContentItem contentItem) {
|
||||
var context = new ExportContentContext(contentItem, new XElement(contentItem.ContentType));
|
||||
var context = new ExportContentContext(contentItem, new XElement(XmlConvert.EncodeLocalName(contentItem.ContentType)));
|
||||
|
||||
foreach (var contentHandler in Handlers) {
|
||||
contentHandler.Exporting(context);
|
||||
|
||||
Reference in New Issue
Block a user