Auto detecting urls inside text - urls have some arabic letters |
03-09-2017, 12:01 PM
(This post was last modified: 03-09-2017, 12:41 PM by ivantcholakov. Edit Reason: the second suggestion )
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)) |
Messages In This Thread |
Auto detecting urls inside text - urls have some arabic letters - by khashabawy - 03-09-2017, 06:51 AM
RE: Auto detecting urls inside text - urls have some arabic letters - by zploskey - 03-09-2017, 10:52 AM
RE: Auto detecting urls inside text - urls have some arabic letters - by khashabawy - 03-09-2017, 11:50 AM
RE: Auto detecting urls inside text - urls have some arabic letters - by zploskey - 03-09-2017, 12:54 PM
RE: Auto detecting urls inside text - urls have some arabic letters - by ivantcholakov - 03-09-2017, 12:01 PM
RE: Auto detecting urls inside text - urls have some arabic letters - by khashabawy - 03-09-2017, 01:19 PM
RE: Auto detecting urls inside text - urls have some arabic letters - by ivantcholakov - 03-09-2017, 01:27 PM
|