Skip to content

Commit

Permalink
Automatically pass public filter when no blacklist configured
Browse files Browse the repository at this point in the history
  • Loading branch information
thebaer committed Mar 12, 2018
1 parent 2caebcf commit 7893f07
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions filter.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
package htmlhouse

func passesPublicFilter(app *app, html string) bool {
if app.cfg.BlacklistTerms == "" {
return true
}

spam := app.cfg.BlacklistReg.MatchString(html)
return !spam
}

0 comments on commit 7893f07

Please sign in to comment.