package main
import (
"log"
"github.com/microcosm-cc/bluemonday"
)
func main() {
c := "hello doesn't work 😖"
p := bluemonday.UGCPolicy()
log.Println(p.Sanitize(c))
}
预期输出应为hello doesn't work 😖
,而不是接收hello doesn't work 😖
我尝试将allowlist与regexp一起使用,但它不起作用
1条答案
按热度按时间km0tfn4u1#
这在HTML的上下文中并不是真正的变化,正如您在下面看到的: