mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Adapting MediaProcessingHtmlFilter to IHtmlFilter breaking change
This commit is contained in:
+2
-3
@@ -7,7 +7,6 @@ using Orchard.Logging;
|
|||||||
using Orchard.MediaProcessing.Models;
|
using Orchard.MediaProcessing.Models;
|
||||||
using Orchard.MediaProcessing.Services;
|
using Orchard.MediaProcessing.Services;
|
||||||
using Orchard.Services;
|
using Orchard.Services;
|
||||||
using Orchard.Settings;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@@ -49,8 +48,8 @@ namespace Orchard.MediaProcessing.Filters {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public string ProcessContent(string text, string flavor) {
|
public string ProcessContent(string text, HtmlFilterContext context) {
|
||||||
if (!string.IsNullOrEmpty(text) && flavor == "html") {
|
if (!string.IsNullOrEmpty(text) && context.Flavor == "html") {
|
||||||
var doc = new HtmlDocument();
|
var doc = new HtmlDocument();
|
||||||
doc.LoadHtml(text);
|
doc.LoadHtml(text);
|
||||||
foreach (var node in doc.DocumentNode.DescendantsAndSelf("img")) {
|
foreach (var node in doc.DocumentNode.DescendantsAndSelf("img")) {
|
||||||
|
|||||||
Reference in New Issue
Block a user