Alex Ellis 4e73f787da Include markdown sample
Fix UI refresh problem
Enable invocation from portal
2017-01-31 09:08:58 +00:00

18 lines
314 B
Go

package main
import (
"fmt"
"io/ioutil"
"os"
"github.com/microcosm-cc/bluemonday"
"github.com/russross/blackfriday"
)
func main() {
input, _ := ioutil.ReadAll(os.Stdin)
unsafe := blackfriday.MarkdownCommon([]byte(input))
html := bluemonday.UGCPolicy().SanitizeBytes(unsafe)
fmt.Println(string(html))
}