From: Cindy Li Date: Tue, 24 Aug 2010 14:20:57 +0000 (-0000) Subject: make_clickable(): improve regular expression of converting URL to ignore the beginnin... X-Git-Tag: v1.0~19 X-Git-Url: https://iam.tj/gitweb/gitweb.cgi?p=acontent.git;a=commitdiff_plain;h=ceec15a32175a1f1f68ae4efe6d8fb124fce316a make_clickable(): improve regular expression of converting URL to ignore the beginning " or ending ) --- diff --git a/docs/include/lib/output.inc.php b/docs/include/lib/output.inc.php index 672cb81..6aa0d81 100644 --- a/docs/include/lib/output.inc.php +++ b/docs/include/lib/output.inc.php @@ -677,7 +677,7 @@ function make_clickable($text) { $text = preg_replace("/(\[media\])([\s]*)(.*)(\[\/media\])/", '$1$3$4', $text); $text = preg_replace("/(\[media\])(.*)([\s]*)(\[\/media\])/U", '$1$2$4', $text); // 2. convert URL - $text = preg_replace('/(^|[\n ])([\w]*?)((?$3', $text); // convert email address to clickable URL that pops up "send email" interface with the address filled in