|
@@ -5,7 +5,7 @@ import (
|
|
|
)
|
|
|
|
|
|
const (
|
|
|
- REPLTXT = "*************************************"
|
|
|
+ REPLTXT = "**************************************************************************"
|
|
|
)
|
|
|
|
|
|
//过滤,验证是否存在敏感词
|
|
@@ -76,7 +76,7 @@ func Repl(atxt ...string) string {
|
|
|
}
|
|
|
for _, keyword := range keywords {
|
|
|
if len(atxt) == 1 {
|
|
|
- txt = strings.Replace(txt, keyword, REPLTXT[:len(keyword)], -1)
|
|
|
+ txt = strings.Replace(txt, keyword, REPLTXT[:len([]rune(keyword))], -1)
|
|
|
} else {
|
|
|
txt = strings.Replace(txt, keyword, repl, -1)
|
|
|
}
|