Providing flavor information to IHtmlFilter

--HG--
branch : 1.x
This commit is contained in:
Sebastien Ros 2011-09-27 16:35:57 -07:00
parent 45e6cf723b
commit 8db0168073
3 changed files with 4 additions and 4 deletions

View File

@ -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));
})
);

View File

@ -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);
}

View File

@ -1,5 +1,5 @@
namespace Orchard.Services {
public interface IHtmlFilter : IDependency {
string ProcessContent(string text);
string ProcessContent(string text, string flavor);
}
}