diff options
author | Andrey Andreev <narf@devilix.net> | 2017-09-29 11:00:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-29 11:00:24 +0200 |
commit | fccbf8802be41595c4a7c8b8b06dbc85333447ba (patch) | |
tree | b72d9ff93fd5e5556fa888c06c64459fe0414e92 /system/helpers | |
parent | 1db998348e8850db79c4afa2d057fa31fb6bc12c (diff) | |
parent | 3e59801223f1393507d81e9f394c4f5ae33e1c04 (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.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/system/helpers/url_helper.php b/system/helpers/url_helper.php index 99e82ef9f..421b3bad5 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"' : ''; |