From 533c0ea6ec2a833585f50535e6d16594f5371711 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 26 Nov 2010 13:13:09 +0300 Subject: [PATCH] make plaintext urls in article content clickable --- functions.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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; + } + ?> -- 2.39.5