mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-09-22 20:13:50 +08:00
Providing flavor information to IHtmlFilter
--HG-- branch : 1.x
This commit is contained in:
@@ -33,12 +33,12 @@ namespace Orchard.Core.Common.Drivers {
|
||||
return Combined(
|
||||
ContentShape("Parts_Common_Body",
|
||||
() => {
|
||||
var bodyText = _htmlFilters.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(ContentPart: part, Html: new HtmlString(bodyText));
|
||||
}),
|
||||
ContentShape("Parts_Common_Body_Summary",
|
||||
() => {
|
||||
var bodyText = _htmlFilters.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(ContentPart: part, Html: new HtmlString(bodyText));
|
||||
})
|
||||
);
|
||||
|
@@ -5,7 +5,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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user