mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
#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:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user