File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -630,15 +630,15 @@ func RenderMarkup(markupType string, raw string) template.HTML {
630
630
if markupType == "markdown" {
631
631
if renderedContent , err = markdown .RenderString (& markup.RenderContext {}, raw ); err != nil {
632
632
log .Warn ("Markdown2html: Invalid markdown? %v" , err )
633
- return template .HTML (html .EscapeString (renderedContent ))
633
+ return template .HTML (html .EscapeString (raw ))
634
634
}
635
- return template .HTML (markup .Sanitize (raw ))
635
+ return template .HTML (markup .Sanitize (renderedContent ))
636
636
} else if markupType == "markup" {
637
637
if renderedContent , err = markup .RenderString (& markup.RenderContext {}, raw ); err != nil {
638
638
log .Warn ("Markdown2html: Invalid markup? %v" , err )
639
- return template .HTML (html .EscapeString (renderedContent ))
639
+ return template .HTML (html .EscapeString (raw ))
640
640
}
641
- return template .HTML (markup .Sanitize (raw ))
641
+ return template .HTML (markup .Sanitize (renderedContent ))
642
642
}
643
643
644
644
return template .HTML (fmt .Sprintf (`Unsupported markup: :%s:` , markupType ))
You can’t perform that action at this time.
0 commit comments