Same name and namespace in other branches
- 8.9.x core/modules/filter/filter.module \_filter_url_parse_email_links()
- 9 core/modules/filter/filter.module \_filter_url_parse_email_links()
Makes links out of e-mail addresses.
Callback for preg_replace_callback() within _filter_url().
Related topics
1 string reference to '_filter_url_parse_email_links'
- _filter_url in modules/
filter/ filter.module - Implements callback_filter_process().
File
- modules/
filter/ filter.module, line 1594 - Framework for handling the 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>';
}