mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-21 11:17:28 +08:00
Reverting comments filters changes
--HG-- branch : 1.x
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using JetBrains.Annotations;
|
||||
@@ -38,13 +37,12 @@ namespace Orchard.Core.Common.Drivers {
|
||||
return Combined(
|
||||
ContentShape("Parts_Common_Body",
|
||||
() => {
|
||||
var flavor = GetFlavor(part);
|
||||
var bodyText = _htmlFilters.Where(x => x.GetType().Name.Equals(flavor + "filter", StringComparison.OrdinalIgnoreCase)).Aggregate(part.Text, (text, filter) => filter.ProcessContent(text));
|
||||
var bodyText = _htmlFilters.Aggregate(part.Text, (text, filter) => filter.ProcessContent(text, GetFlavor(part)));
|
||||
return shapeHelper.Parts_Common_Body(Html: new HtmlString(bodyText));
|
||||
}),
|
||||
ContentShape("Parts_Common_Body_Summary",
|
||||
() => {
|
||||
var bodyText = _htmlFilters.Where(x => x.GetType().Name.Equals(GetFlavor(part) + "filter", StringComparison.OrdinalIgnoreCase)).Aggregate(part.Text, (text, filter) => filter.ProcessContent(text));
|
||||
var bodyText = _htmlFilters.Aggregate(part.Text, (text, filter) => filter.ProcessContent(text, GetFlavor(part)));
|
||||
return shapeHelper.Parts_Common_Body_Summary(Html: new HtmlString(bodyText));
|
||||
})
|
||||
);
|
||||
|
@@ -39,7 +39,7 @@ namespace Orchard.Core.Common.Drivers {
|
||||
() => {
|
||||
var settings = field.PartFieldDefinition.Settings.GetModel<TextFieldSettings>();
|
||||
|
||||
object fieldValue = new HtmlString(_htmlFilters.Where(x => x.GetType().Name.Equals(settings.Flavor + "filter", StringComparison.OrdinalIgnoreCase)).Aggregate(field.Value, (text, filter) => filter.ProcessContent(text)));
|
||||
object fieldValue = new HtmlString(_htmlFilters.Aggregate(field.Value, (text, filter) => filter.ProcessContent(text, settings.Flavor)));
|
||||
return shapeHelper.Fields_Common_Text(Name: field.Name, Value: fieldValue);
|
||||
});
|
||||
}
|
||||
|
@@ -6,7 +6,7 @@ using Orchard.Services;
|
||||
|
||||
namespace Orchard.Core.Common.Services {
|
||||
public class BbcodeFilter : IHtmlFilter {
|
||||
public string ProcessContent(string text) {
|
||||
public string ProcessContent(string text, string flavor) {
|
||||
return BbcodeReplace(text);
|
||||
}
|
||||
|
||||
|
@@ -50,7 +50,7 @@ namespace Orchard.Core.Feeds.StandardBuilders {
|
||||
public string Description {
|
||||
get {
|
||||
if (_body != null && !string.IsNullOrEmpty(_body.Text)) {
|
||||
return _htmlFilters.Where(x => x.GetType().Name.Equals(GetFlavor(_body) + "filter", StringComparison.OrdinalIgnoreCase)).Aggregate(_body.Text, (text, filter) => filter.ProcessContent(text));
|
||||
return _htmlFilters.Aggregate(_body.Text, (text, filter) => filter.ProcessContent(text, GetFlavor(_body)));
|
||||
}
|
||||
return Title;
|
||||
}
|
||||
|
Reference in New Issue
Block a user