Welcome Guest, Not a member yet? Register   Sign In
Auto detecting urls inside text - urls have some arabic letters
#6

(03-09-2017, 12:01 PM)ivantcholakov Wrote: A quick modification without much thinking - see this line: https://github.com/bcit-ci/CodeIgniter/b...r.php#L396

Change it in the following way and make a test:

Code:
if ($type !== 'email' && preg_match_all('#(\w*://|www\.)[^\s()<>;]+\w#ui', $str, $matches, PREG_OFFSET_CAPTURE | PREG_SET_ORDER))

If you are satisfied revert this change, make application/helpers/MY_url_helper.php file and put the whole modified function there.

Edit: You may try also the following modification:
Code:
if ($type !== 'email' && preg_match_all('#(\w*://|www\.)[^\s()<>;]+\w#i'.(UTF8_ENABLED ? 'u' : ''), $str, $matches, PREG_OFFSET_CAPTURE | PREG_SET_ORDER))

WOW ! worked like magic , Thanks ivantcholakov
Reply


Messages In This Thread
RE: Auto detecting urls inside text - urls have some arabic letters - by khashabawy - 03-09-2017, 01:19 PM



Theme © iAndrew 2016 - Forum software by © MyBB