Update search keywords
This commit is contained in:
parent
f3925c1095
commit
188e2e147c
|
@ -66,8 +66,9 @@ func RestrictSearchTerms(terms *models.Search) (*models.Search, error) {
|
||||||
// Restricted search terms.
|
// Restricted search terms.
|
||||||
var restrictedSearchTerms = []string{
|
var restrictedSearchTerms = []string{
|
||||||
"open", "mind", "minded", "openminded", "openmind", "taboo", "tabboo", "perv", "pervy", "grew", "raised", "raise",
|
"open", "mind", "minded", "openminded", "openmind", "taboo", "tabboo", "perv", "pervy", "grew", "raised", "raise",
|
||||||
"children", "kid", "kids", "dad", "dads", "mom", "moms", "underage", "yng", "ynger", "family", "families",
|
"children", "child", "kid", "kids", "dad", "dads", "mom", "moms", "father", "mother", "underage", "yng", "ynger", "family", "families",
|
||||||
"18", "shota", "shotacon", "loli", "lolicon", "jailbait", "incest", "limit", "limits",
|
"18", "shota", "shotacon", "loli", "lolicon", "jailbait", "incest", "limit", "limits", "uninhibited", "depraved", "age", "ages",
|
||||||
|
"son", "daughter", "sons", "daughters",
|
||||||
}
|
}
|
||||||
|
|
||||||
func restrictTermsFrom(terms []string, blacklist map[string]interface{}) ([]string, int) {
|
func restrictTermsFrom(terms []string, blacklist map[string]interface{}) ([]string, int) {
|
||||||
|
@ -77,11 +78,15 @@ func restrictTermsFrom(terms []string, blacklist map[string]interface{}) ([]stri
|
||||||
)
|
)
|
||||||
|
|
||||||
for _, term := range terms {
|
for _, term := range terms {
|
||||||
if _, ok := blacklist[strings.ToLower(term)]; ok {
|
// Break words in "quoted strings" too.
|
||||||
|
words := strings.Split(term, " ")
|
||||||
|
for _, word := range words {
|
||||||
|
if _, ok := blacklist[strings.ToLower(word)]; ok {
|
||||||
count++
|
count++
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
result = append(result, term)
|
result = append(result, word)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return result, count
|
return result, count
|
||||||
|
|
|
@ -73,10 +73,26 @@
|
||||||
{{if .RestrictedSearchError}}
|
{{if .RestrictedSearchError}}
|
||||||
<div class="notification is-danger is-light content">
|
<div class="notification is-danger is-light content">
|
||||||
<p>
|
<p>
|
||||||
<i class="fa fa-exclamation-triangle mr-1"></i>
|
<i class="fa fa-hand mr-1"></i>
|
||||||
<strong>Notice:</strong> Some of your search terms will be ignored, as we think
|
<strong>Child sexual abuse is illegal</strong>
|
||||||
they may be associated to child sexual abuse.
|
</p>
|
||||||
Please review the <a href="/tos#child-exploitation">Terms of Service</a> for more information.
|
|
||||||
|
<p>
|
||||||
|
We think that your search might be associated with child sexual abuse. Child sexual abuse or seeking
|
||||||
|
sexual imagery or contact with children can lead to imprisonment and other severe personal consequences,
|
||||||
|
and this abuse causes extreme harm to children and searching and viewing such material adds to that harm.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
It is also against the <a href="/tos#child-exploitation">Terms of Service</a> of this website, and
|
||||||
|
members who violate this rule will be banned. This website is actively monitored to keep on top of this stuff,
|
||||||
|
and we cooperate enthusiastically with
|
||||||
|
<a href="https://www.missingkids.org/" title="National Center for Missing and Exploited Children">NCMEC</a>
|
||||||
|
and relevant law enforcement agencies.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<strong>This incident has been reported to the website administrator.</strong>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user