_filter_url_parse_email_links

7 filter.module _filter_url_parse_email_links($match)
8 filter.module _filter_url_parse_email_links($match)

preg_replace callback to make links out of e-mail addresses.

Related topics

1 string reference to '_filter_url_parse_email_links'

File

modules/filter/filter.module, line 1507
Framework for handling filtering of content.

Code

function _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(_filter_url_trim($match[$i]));
  $match[$i] = check_plain($match[$i]);
  return '<a href="mailto:' . $match[$i] . '">' . $caption . '</a>';
}
Login or register to post comments