title: How to return html on Gin?
body: <p>I'm trying to render a HTML that's already on a string instead of rendering a template on Gin framework.</p>
  
  <p>The <code>c.HTML</code> function on <code>GET("/")</code> function expects a template to be rendered.</p>
  
  <p>But on <code>POST("/markdown")</code> I've rendered that HTML on a string already.</p>
  
  <p><strong>How can I return it on Gin?</strong></p>
  
  <pre><code>package main
  
  import (
      "github.com/gin-gonic/gin"
      "github.com/russross/blackfriday"
      "log"
      "net/http"
      "os"
  )
  
  func main() {
  
      router := gin.New()
      router.Use(gin.Logger())
      router.LoadHTMLGlob("templates/*.tmpl.html")
  
      router.GET("/", func(c *gin.Context) {
          c.HTML(http.StatusOK, "index.tmpl.html", nil)
      })
  
      router.POST("/markdown", func(c *gin.Context) {
          body := c.PostForm("body")
          log.Println(body)
          markdown := blackfriday.MarkdownCommon([]byte(c.PostForm("body")))
          log.Println(markdown)
          // TODO: render markdown content on return
      })
  
      router.Run(":5000")
  }
  </code></pre>