From 1704efa50a7853f30d5476a60b6124bc04d06afe Mon Sep 17 00:00:00 2001 From: phpnut Date: Sun, 21 Oct 2007 22:21:28 +0000 Subject: [PATCH] Fixes #3419, $text->autoLink does not preserve existing links git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5836 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/libs/view/helpers/text.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cake/libs/view/helpers/text.php b/cake/libs/view/helpers/text.php index 44f988976..e1a4eb8f4 100644 --- a/cake/libs/view/helpers/text.php +++ b/cake/libs/view/helpers/text.php @@ -106,10 +106,10 @@ class TextHelper extends AppHelper { } $options .= ')'; - $text=preg_replace_callback('#((?:http|https|ftp|nntp)://[^ <]+)#', create_function('$matches', + $text = preg_replace_callback('#(?)((?:http|https|ftp|nntp)://[^ <]+)#i', create_function('$matches', '$Html = new HtmlHelper(); $Html->tags = $Html->loadConfig(); return $Html->link($matches[0], $matches[0],' . $options . ');'), $text); - return preg_replace_callback('#(?)(?tags = $Html->loadConfig(); return $Html->link($matches[0], "http://" . low($matches[0]),' . $options . ');'), $text); } /**