function _filter_url_trim
Same name in other branches
- 7.x modules/filter/filter.module \_filter_url_trim()
- 9 core/modules/filter/filter.module \_filter_url_trim()
- 10 core/modules/filter/filter.module \_filter_url_trim()
- 11.x core/modules/filter/filter.module \_filter_url_trim()
Shortens long URLs to http://www.example.com/long/url…
Related topics
4 calls to _filter_url_trim()
- _filter_url in core/
modules/ filter/ filter.module - Converts text into hyperlinks automatically.
- _filter_url_parse_email_links in core/
modules/ filter/ filter.module - Makes links out of email addresses.
- _filter_url_parse_full_links in core/
modules/ filter/ filter.module - Makes links out of absolute URLs.
- _filter_url_parse_partial_links in core/
modules/ filter/ filter.module - Makes links out of domain names starting with "www."
File
-
core/
modules/ filter/ filter.module, line 677
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;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.