fix content filtering regex.

This commit is contained in:
fiatjaf
2024-06-18 16:44:02 -03:00
parent 66cef7d1c0
commit 7c9c4a09cd

View File

@@ -69,6 +69,6 @@ var pornWordsRe = func() *regexp.Regexp {
"teen porn",
}
concat := strings.Join(pornWords, "|")
regex := fmt.Sprintf(`\b()\b`, concat)
regex := fmt.Sprintf(`\b(%s)\b`, concat)
return regexp.MustCompile(regex)
}()