mirror of
https://github.com/lempamo/Project-Unite.git
synced 2025-02-02 04:57:35 +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 @@ namespace Project_Unite
|
||||||
|
|
||||||
public static IHtmlString Markdown(this HtmlHelper hpr, string md)
|
public static IHtmlString Markdown(this HtmlHelper hpr, string md)
|
||||||
{
|
{
|
||||||
|
if (md == null)
|
||||||
|
return hpr.Raw("");
|
||||||
md = ResolveUserLinksInMarkdown(md);
|
md = ResolveUserLinksInMarkdown(md);
|
||||||
return hpr.Raw(CommonMark.CommonMarkConverter.Convert(hpr.Encode(md)));
|
return hpr.Raw(CommonMark.CommonMarkConverter.Convert(hpr.Encode(md)));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue