summaryrefslogtreecommitdiffstats
path: root/system/helpers
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2017-09-29 11:00:24 +0200
committerAndrey Andreev <narf@devilix.net>2017-09-29 11:00:47 +0200
commitd13babc46bf0e1de0f82cfdef859b949501f095b (patch)
tree64d8357ebe369df26b942d62a304a197e2442484 /system/helpers
parenta9194650e6ae387be29aacfdf4b1b27a5c60ca34 (diff)
Merge pull request #5278 from Uekawa/auto_link
Fix auto_link trailing slash
Diffstat (limited to 'system/helpers')
-rwxr-xr-x[-rw-r--r--]system/helpers/url_helper.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/system/helpers/url_helper.php b/system/helpers/url_helper.php
index 84023affd..f6fb7d9eb 100644..100755
--- a/system/helpers/url_helper.php
+++ b/system/helpers/url_helper.php
@@ -393,7 +393,7 @@ if ( ! function_exists('auto_link'))
function auto_link($str, $type = 'both', $popup = FALSE)
{
// Find and replace any URLs.
- if ($type !== 'email' && preg_match_all('#(\w*://|www\.)[^\s()<>;]+\w#i', $str, $matches, PREG_OFFSET_CAPTURE | PREG_SET_ORDER))
+ if ($type !== 'email' && preg_match_all('#(\w*://|www\.)[^\s()<>;]+\w/?#i', $str, $matches, PREG_OFFSET_CAPTURE | PREG_SET_ORDER))
{
// Set our target HTML if using popup links.
$target = ($popup) ? ' target="_blank"' : '';