#19957: Using static String.Equals to compare against specified flavor to avoid NRE in case flavor is null.

Work Item: 19957

--HG--
branch : 1.x
This commit is contained in:
Sipke Schoorstra
2013-07-30 22:28:00 -07:00
parent d951706364
commit 5a43c494d1

View File

@@ -4,7 +4,7 @@ using Orchard.Services;
namespace Markdown.Services {
public class MarkdownFilter : IHtmlFilter {
public string ProcessContent(string text, string flavor) {
return flavor.Equals("markdown", StringComparison.OrdinalIgnoreCase) ? MarkdownReplace(text) : text;
return String.Equals(flavor, "markdown", StringComparison.OrdinalIgnoreCase) ? MarkdownReplace(text) : text;
}
private static string MarkdownReplace(string text) {