You are here

function _footnotes_filter_url_parse_partial_links in Footnotes 6.2

Same name and namespace in other branches
  1. 5.2 footnotes.module \_footnotes_filter_url_parse_partial_links()

Callback function. Make links out of domain names starting with "www.".

File

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

Code

function _footnotes_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(_footnotes_filter_url_trim($match[$i]));
  $match[$i] = check_plain($match[$i]);
  return '<a href="http://' . $match[$i] . '" title="' . $match[$i] . '">' . $caption . '</a>' . $match[$i + 1];
}