If you are interested in trying some new regex out, I generated some that seems to work.
Open includes/functions.php
Find the get_preg_expression() function
In it there are returns in every case, for the url, www_url, and relative_url, comment out the returns and put these in their place:
Code: Select all
return "[a-z][a-z\d+\-.]*:/{2}(?:(?:[\x80-\xFFa-z0-9\-._~!$&'()*+,;=:@|]+|%[\dA-F]{2})+|[0-9.]+|\[[a-z0-9.]+:[a-z0-9.]+:[a-z0-9.:]+\])(?::\d*)?(?:/(?:[\x80-\xFFa-z0-9\-._~!$&'()*+,;=:@|]+|%[\dA-F]{2})*)*(?:\?(?:[\x80-\xFFa-z0-9\-._~!$&'()*+,;=:@/?|]+|%[\dA-F]{2})*)?(?:\#(?:[\x80-\xFFa-z0-9\-._~!$&'()*+,;=:@/?|]+|%[\dA-F]{2})*)?";
return "www\.(?:[\x80-\xFFa-z0-9\-._~!$&'()*+,;=:@|]+|%[\dA-F]{2})+(?::\d*)?(?:/(?:[\x80-\xFFa-z0-9\-._~!$&'()*+,;=:@|]+|%[\dA-F]{2})*)*(?:\?(?:[\x80-\xFFa-z0-9\-._~!$&'()*+,;=:@/?|]+|%[\dA-F]{2})*)?(?:\#(?:[\x80-\xFFa-z0-9\-._~!$&'()*+,;=:@/?|]+|%[\dA-F]{2})*)?";
return "(?:[\x80-\xFFa-z0-9\-._~!$&'()*+,;=:@|]+|%[\dA-F]{2})*(?:/(?:[\x80-\xFFa-z0-9\-._~!$&'()*+,;=:@|]+|%[\dA-F]{2})*)*(?:\?(?:[\x80-\xFFa-z0-9\-._~!$&'()*+,;=:@/?|]+|%[\dA-F]{2})*)?(?:\#(?:[\x80-\xFFa-z0-9\-._~!$&'()*+,;=:@/?|]+|%[\dA-F]{2})*)?";
I've not extensively tested it however, but didn't notice any problems (can't think of any security issues either).