| 5 filter.module | _filter_url_parse_partial_links($match) |
| 6 filter.module | _filter_url_parse_partial_links($match) |
| 7 filter.module | _filter_url_parse_partial_links($match) |
| 8 filter.module | _filter_url_parse_partial_links($match) |
preg_replace callback to make links out of domain names starting with "www."
Related topics
1 string reference to '_filter_url_parse_partial_links'
File
- modules/
filter/ filter.module, line 1520 - Framework for handling filtering of content.
Code
function _filter_url_parse_partial_links($match) {
// The $i:th parenthesis in the regexp contains the URL.
$i = 1;
$match[$i] = decode_entities($match[$i]);
$caption = check_plain(_filter_url_trim($match[$i]));
$match[$i] = check_plain($match[$i]);
return '<a href="http://' . $match[$i] . '">' . $caption . '</a>' . $match[$i + 1];
}
Login or register to post comments