5 November 2013

Converts URLs in text into links in Drupal 7 automatically. Three types of "links" get converted. URLs like http://example.com, e-mail addresses like name@example.com and urls without the "http://" protocol like www.example.com.

Source code viewer
  1. module_load_include('module', 'filter');
  2.  
  3. $filter = new stdClass();
  4. $filter->callback = '_filter_url';
  5. $filter->settings = array(
  6. 'filter_url_length' => 300,
  7. );
  8.  
  9. echo _filter_url($html, $filter);
Programming Language: PHP