You are here

function invisimail_callback in Invisimail 5

Same name and namespace in other branches
  1. 6 invisimail.module \invisimail_callback()
1 string reference to 'invisimail_callback'
invisimail in ./invisimail.module

File

./invisimail.module, line 99
This module provides a filter that will search content for email addresses and replace them with their ascii equivalents before display. This is not a complete protection from spam harvesters, but it is some help.

Code

function invisimail_callback($matches) {
  $format = $GLOBALS['invisimail_format'];
  $js = variable_get('invisimail_js_' . $format, FALSE);
  $link = variable_get('invisimail_link_' . $format, FALSE);
  return $matches[1] . invisimail_ascii_encode($matches[2], $js, $link) . $matches[3];
}