From: Andrew Dolgov Date: Fri, 26 Nov 2010 10:13:09 +0000 (+0300) Subject: make plaintext urls in article content clickable X-Git-Tag: 1.5.0~36 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=533c0ea6ec2a833585f50535e6d16594f5371711;p=tt-rss.git make plaintext urls in article content clickable --- diff --git a/functions.php b/functions.php index 1d37727f..a7e106a9 100644 --- a/functions.php +++ b/functions.php @@ -3671,6 +3671,8 @@ $res = preg_replace('/]+>/is', '', $res); } + $res = rewrite_urls($res); + $charset_hack = ' '; @@ -7040,4 +7042,15 @@ } + function rewrite_urls($line) { + global $url_regex; + + $urls = null; + + $result = preg_replace("/((?\\1", $line); + + return $result; + } + ?>