_filter_url_parse_partial_links($match)
Makes links out of domain names starting with "www."
Callback for preg_replace_callback() within _filter_url().
function _filter_url_parse_partial_links($match) { // 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>'; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!modules!filter!filter.module/function/_filter_url_parse_partial_links/8.1.x