summaryrefslogtreecommitdiffstats
path: root/system/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'system/helpers')
-rw-r--r--system/helpers/url_helper.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/system/helpers/url_helper.php b/system/helpers/url_helper.php
index 8be327276..e54969b22 100644
--- a/system/helpers/url_helper.php
+++ b/system/helpers/url_helper.php
@@ -388,7 +388,7 @@ if ( ! function_exists('auto_link'))
{
// Set our target HTML if using popup links.
$target = ($popup) ? 'target="_blank"' : '';
-
+
// We process the links in reverse order (last -> first) so that
// the returned string offsets from preg_match_all() are not
// moved as we add more HTML.
@@ -396,13 +396,13 @@ if ( ! function_exists('auto_link'))
{
// $match is an array generated by the PREG_OFFSET_CAPTURE flag.
// $match[0] is the matched string, $match[1] is the string offset.
-
+
$anchor = anchor($match[0], '', $target);
-
+
$str = substr_replace($str, $anchor, $match[1], strlen($match[0]));
}
}
-
+
// Find and replace any emails.
if ($type !== 'url' && preg_match_all('#([\w\.\-\+]+@[a-z0-9\-]+\.[a-z0-9\-\.]+[^[:punct:]\s])#i', $str, $matches, PREG_OFFSET_CAPTURE))
{
@@ -414,7 +414,7 @@ if ( ! function_exists('auto_link'))
}
}
}
-
+
return $str;
}
}