Example #1
0
File: output.php Project: elgg/elgg
/**
 * Takes a string and turns any URLs into formatted links
 *
 * @param string $text The input string
 *
 * @return string The output string with formatted links
 */
function parse_urls($text)
{
    $linkify = new \Misd\Linkify\Linkify();
    return $linkify->processUrls($text, ['attr' => ['rel' => 'nofollow']]);
}