mirror of
https://github.com/lempamo/Project-Unite.git
synced 2025-01-22 17:22:15 +00:00
don't parse null strings as md
This commit is contained in:
parent
bc56237435
commit
3e98bc2e52
1 changed files with 2 additions and 0 deletions
|
@ -121,6 +121,8 @@ public static string ResolveUserLinksInMarkdown(string mkdn)
|
|||
|
||||
public static IHtmlString Markdown(this HtmlHelper hpr, string md)
|
||||
{
|
||||
if (md == null)
|
||||
return hpr.Raw("");
|
||||
md = ResolveUserLinksInMarkdown(md);
|
||||
return hpr.Raw(CommonMark.CommonMarkConverter.Convert(hpr.Encode(md)));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue