Disallowed Comment Terms and Hidden Email Addresses

What It Does

When comments stay on, Anti-Spam can add a large list of disallowed terms to the WordPress comment filter. The list holds more than 20,000 words, in several languages. It is merged into Disallowed Comment Keys only while a comment is checked. The list stored in WordPress is left unchanged.

A person who is signed in is not run through this list.

The same Anti-Spam module also hides email addresses on the public site, so a bot cannot harvest them from the HTML:

  • addresses in visible text (content, excerpt, comment text, and text widgets);
  • addresses in a mailto: link.

Text inside script, style, textarea, pre, and code is left as it is. A file name such as image@2x.png is left as it is. An address longer than 320 characters is left as it is.

Why It Matters

The WordPress disallowed list starts empty. Spam comments reuse the same words, links, and addresses across sites. A shared list catches those without editing the WordPress setting by hand.

A visible email address is copied by spam bots. Hiding it in the HTML keeps the address readable for a person and harder to collect in bulk. Skipping code and stylesheets avoids breaking a script or a retina file name.

How to Use

Open the Spam & Phishing module, Anti-Spam Rules section.

  1. Choose Yes, comments are required on my website to combat comment spam.
  2. Enable Yes, implement enhanced comment filtering with disallowed terms to detect spam.

The checkbox stays disabled while spam-disallowed-terms.data cannot be read. Email hiding starts with Anti-Spam itself. There is no separate checkbox for it.

How a caught comment is stored (spam, or trash) is set by Handling Spam, in the same section.