Ejemplo n.º 1
0
 public string FilterHtml(IPost p)
 {
     return(filter.FilterHtml(
                p.Content,
                ProjectSettings.CdnUrl,
                ProjectSettings.LocalMediaVirtualPath));
 }
Ejemplo n.º 2
0
        public string FilterHtml(IContentItem p, IProjectSettings projectSettings)
        {
            if (p.ContentType == "markdown")
            {
                if (_mdPipeline == null)
                {
                    _mdPipeline = new MarkdownPipelineBuilder().UseAdvancedExtensions().Build();
                }

                return(Markdown.ToHtml(p.Content, _mdPipeline));
            }
            return(_htmlProcessor.FilterHtml(
                       p.Content,
                       projectSettings.CdnUrl,
                       projectSettings.LocalMediaVirtualPath));
        }