diff --git a/lib/Cake/Test/Case/View/Helper/TextHelperTest.php b/lib/Cake/Test/Case/View/Helper/TextHelperTest.php index 41ef4b296..87d81b14a 100644 --- a/lib/Cake/Test/Case/View/Helper/TextHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/TextHelperTest.php @@ -127,6 +127,10 @@ class TextHelperTest extends CakeTestCase { $expected = 'Text with a partial www.cakephp.org URL and test@cakephp\.org email address'; $this->assertRegExp('#^' . $expected . '$#', $result); + $text = 'Text with a partial link link'; + $result = $this->Text->autoLink($text, array('escape' => false)); + $this->assertEquals($text, $result); + $text = 'This is a test text with URL http://www.cakephp.org'; $expected = 'This is a test text with URL http://www.cakephp.org'; $result = $this->Text->autoLink($text); diff --git a/lib/Cake/View/Helper/TextHelper.php b/lib/Cake/View/Helper/TextHelper.php index 92d30ace6..2a2a536b4 100644 --- a/lib/Cake/View/Helper/TextHelper.php +++ b/lib/Cake/View/Helper/TextHelper.php @@ -114,7 +114,7 @@ class TextHelper extends AppHelper { $text ); $text = preg_replace_callback( - '#(?)(?)(?