Hey…
just wrote a simple filter for Email contact form, maybe someone else is interested in.
just add after $data = [...];
in /site/controllers/contact.php
.
// filter specific phrases
$filter = [
'@badmail.host', 'foo.bar', 'viagra'
];
foreach($filter as $match) {
if(preg_grep('/' . preg_quote($match, '/') . '/i', $data)){
go($page->url());
exit;
}
}