mirror of
https://github.com/openfaas/faas.git
synced 2025-06-09 00:36:46 +00:00
18 lines
314 B
Go
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))
|
|
}
|