mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-04-05 21:01:35 +08:00
Providing flavor information to IHtmlFilter
--HG-- branch : 1.x
This commit is contained in:
parent
45e6cf723b
commit
8db0168073
@ -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);
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
namespace Orchard.Services {
|
||||
public interface IHtmlFilter : IDependency {
|
||||
string ProcessContent(string text);
|
||||
string ProcessContent(string text, string flavor);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user