_filter_url_trim

_filter_url_trim($text, $length = NULL)

Shortens long URLs to http://www.example.com/long/url

Related topics

Standard filters
Filters implemented by the Filter module.

File

core/modules/filter/filter.module, line 675
Framework for handling the filtering of content.

Code

function _filter_url_trim($text, $length = NULL) {
  static $_length;
  if ($length !== NULL) {
    $_length = $length;
  }

  if (isset($_length)) {
    $text = Unicode::truncate($text, $_length, FALSE, TRUE);
  }

  return $text;
}
doc_Drupal
2016-10-29 09:57:14
Comments
Leave a Comment

Please login to continue.