function _filter_url_parse_partial_links
Same name and namespace in other branches
- 11.x core/modules/filter/filter.module \_filter_url_parse_partial_links()
- 10 core/modules/filter/filter.module \_filter_url_parse_partial_links()
- 9 core/modules/filter/filter.module \_filter_url_parse_partial_links()
- 8.9.x core/modules/filter/filter.module \_filter_url_parse_partial_links()
- 7.x modules/filter/filter.module \_filter_url_parse_partial_links()
Makes links out of domain names starting with "www.".
Callback for preg_replace_callback() within _filter_url().
Deprecated
in drupal:11.4.0 and is removed from drupal:13.0.0. The logic has been included in \Drupal\filter\Plugin\Filter\FilterUrl::parsePartialLinks() and no replacement is provided.
See also
https://www.drupal.org/node/3566774
Related topics
File
-
core/
modules/ filter/ filter.module, line 356
Code
function _filter_url_parse_partial_links($match) {
@trigger_error(__FUNCTION__ . '() is deprecated in drupal:11.4.0 and is removed from drupal:13.0.0. The logic has been included in \\Drupal\\filter\\Plugin\\Filter\\FilterUrl::parsePartialLinks() and no replacement is provided. See https://www.drupal.org/node/3566774', E_USER_DEPRECATED);
// The $i:th parenthesis in the regexp contains the URL.
$i = 1;
$match[$i] = Html::decodeEntities($match[$i]);
$caption = Html::escape(_filter_url_trim($match[$i]));
$match[$i] = Html::escape($match[$i]);
return '<a href="http://' . $match[$i] . '">' . $caption . '</a>';
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.