summaryrefslogtreecommitdiffstats
path: root/system/helpers
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2017-11-15 13:37:24 +0100
committerAndrey Andreev <narf@devilix.net>2017-11-15 13:37:24 +0100
commit432a9130059873551d1cff3e40d1d8432f552b96 (patch)
treeaabda9878719055ea2ab6c375c29dacb792b5f2f /system/helpers
parent212df3650c30ce93219168d3305f374d8b8ece37 (diff)
parentee8324368f2844aae0d558f1d194419a2181c281 (diff)
Merge branch '3.1-stable' into develop
Note: This intentionally reverts ee8324368f2844aae0d558f1d194419a2181c281
Diffstat (limited to 'system/helpers')
-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 421b3bad5..2e09534f5 100644
--- 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\.)[a-z0-9]+(-+[a-z0-9]+)*(\.[a-z0-9]+(-+[a-z0-9]+)*)+(/([^\s()<>;]+\w)?/?)?#i', $str, $matches, PREG_OFFSET_CAPTURE | PREG_SET_ORDER))
{
// Set our target HTML if using popup links.
$target = ($popup) ? ' target="_blank"' : '';