summaryrefslogtreecommitdiffstats
path: root/tests/codeigniter
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2013-01-28 11:57:13 +0100
committerAndrey Andreev <narf@bofh.bg>2013-01-28 11:57:13 +0100
commit606fee0e2e0aa6a906db82e77090e91f133d7378 (patch)
tree701361189f5531935f8d886c64dfe05e11854ec0 /tests/codeigniter
parent763847931d421753f503608018b0da2bbaa9bfd6 (diff)
Fix auto_link() for the Nth time
- anchor() is for local links and breaks ones that don't have a protocol prefix - Allow :// links (no actual protocol specified) - Further simplified the URL regular expression
Diffstat (limited to 'tests/codeigniter')
-rw-r--r--tests/codeigniter/helpers/url_helper_test.php11
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/codeigniter/helpers/url_helper_test.php b/tests/codeigniter/helpers/url_helper_test.php
index 5fc364238..24823a634 100644
--- a/tests/codeigniter/helpers/url_helper_test.php
+++ b/tests/codeigniter/helpers/url_helper_test.php
@@ -48,11 +48,12 @@ class Url_helper_test extends CI_TestCase {
public function test_auto_link_url()
{
$strings = array(
- 'www.codeigniter.com test' => '<a href="http://www.codeigniter.com">http://www.codeigniter.com</a> test',
+ 'www.codeigniter.com test' => '<a href="http://www.codeigniter.com">www.codeigniter.com</a> test',
'This is my noreply@codeigniter.com test' => 'This is my noreply@codeigniter.com test',
- '<br />www.google.com' => '<br /><a href="http://www.google.com">http://www.google.com</a>',
- 'Download CodeIgniter at www.codeigniter.com. Period test.' => 'Download CodeIgniter at <a href="http://www.codeigniter.com">http://www.codeigniter.com</a>. Period test.',
- 'Download CodeIgniter at www.codeigniter.com, comma test' => 'Download CodeIgniter at <a href="http://www.codeigniter.com">http://www.codeigniter.com</a>, comma test'
+ '<br />www.google.com' => '<br /><a href="http://www.google.com">www.google.com</a>',
+ 'Download CodeIgniter at www.codeigniter.com. Period test.' => 'Download CodeIgniter at <a href="http://www.codeigniter.com">www.codeigniter.com</a>. Period test.',
+ 'Download CodeIgniter at www.codeigniter.com, comma test' => 'Download CodeIgniter at <a href="http://www.codeigniter.com">www.codeigniter.com</a>, comma test',
+ 'This one: ://codeigniter.com must not break this one: http://codeigniter.com' => 'This one: <a href="://codeigniter.com">://codeigniter.com</a> must not break this one: <a href="http://codeigniter.com">http://codeigniter.com</a>'
);
foreach ($strings as $in => $out)
@@ -66,7 +67,7 @@ class Url_helper_test extends CI_TestCase {
public function test_pull_675()
{
$strings = array(
- '<br />www.google.com' => '<br /><a href="http://www.google.com">http://www.google.com</a>',
+ '<br />www.google.com' => '<br /><a href="http://www.google.com">www.google.com</a>',
);
foreach ($strings as $in => $out)