You are here

function _footnotes_filter_url_parse_email_links in Footnotes 5.2

Same name and namespace in other branches
  1. 6.2 footnotes.module \_footnotes_filter_url_parse_email_links()

Callback function. Make links out of e-mail addresses.

File

./footnotes.module, line 635
The Footnotes module is a filter that can be used to insert automatically numbered footnotes into Drupal texts.

Code

function _footnotes_filter_url_parse_email_links($match) {

  // The $i:th parenthesis in the regexp contains the URL.
  $i = 0;
  $match[$i] = decode_entities($match[$i]);
  $caption = check_plain(_footnotes_filter_url_trim($match[$i]));
  $match[$i] = check_url($match[$i]);
  return '<a href="mailto:' . $match[$i] . '" title="' . $match[$i] . '">' . $caption . '</a>';
}