Allow :'s in the path, query string, and fragment parts of the url (Mediawiki URLs often do this)

This commit is contained in:
Craig Andrews
2009-08-31 10:33:37 -04:00
parent 87ae90c903
commit 20423af689
2 changed files with 5 additions and 5 deletions

View File

@@ -442,9 +442,9 @@ function common_replace_urls_callback($text, $callback, $notice_id = null) {
')'.
'(?:'.
'(?:\:\d+)?'. //:port
'(?:/[\pN\pL$\[\]\,\!\(\)\.\-\_\+\/\=\&\;\%\~]*)?'. // /path
'(?:\?[\pN\pL\$\[\]\,\!\(\)\.\-\_\+\/\=\&\;\%\~\/]*)?'. // ?query string
'(?:\#[\pN\pL$\[\]\,\!\(\)\.\-\_\+\/\=\&\;\%\~\/\?\#]*)?'. // #fragment
'(?:/[\pN\pL$\[\]\,\!\(\)\.\:\-\_\+\/\=\&\;\%\~]*)?'. // /path
'(?:\?[\pN\pL\$\[\]\,\!\(\)\.\:\-\_\+\/\=\&\;\%\~\/]*)?'. // ?query string
'(?:\#[\pN\pL$\[\]\,\!\(\)\.\:\-\_\+\/\=\&\;\%\~\/\?\#]*)?'. // #fragment
')(?<![\?\.\,\#\,])'.
')'.
'#ixu';