function invisimail_ascii_encode in Invisimail 6
Same name and namespace in other branches
- 5 invisimail.module \invisimail_ascii_encode()
ASCII-encode an email address.
Parameters
$string: A string containing _only_ an email address to be encoded.
$js: Optional: A boolean which sets whether Javascript is used for encoding.
$link: Optional: A boolean which set whether the result includes a mailto link.
$text: Optional: The text to be used for the link.
Return value
An ascii encoded email address, optionally with link included.
2 calls to invisimail_ascii_encode()
- invisimail_callback in ./
invisimail.module - Callback function used by preg_replace_callback.
- theme_invisimail_formatter_invisimail in ./
invisimail.module
File
- ./
invisimail.module, line 280 - 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_ascii_encode($string, $js = FALSE, $link = FALSE, $text = NULL) {
return $link ? invisimail_encode_add_link($string, $js, $text) : _invisimail_encode_string($string, $js, $link);
}