Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By oziumjinx on
We use the Aggregator2 module extensively throughout our site. I'm wondering if I would be able to filter out phone numbers as well as email addresses when a new item is published that contains these elements.
The last thing we want to do is have a spam-bot pickup an email addy from a syndicated feed we publish.
Also, there might be some legal restrictions in terms of publishing email addresses that you dont own.
Is there a way that I can filter these out?
Comments
PHP regexp.
You could add a hook to the displaying PHP code which runs a regexp removing email addresses or telephone numbers. It's not as complicated as it sounds!
NB you'll want to replace the address/number with something obvious so people can see it's been removed.
Phone numbers will be very hard though.
-- Version Control your Drupal web site with The File High Club's Free Trial!