do not allow [ and ] - they are not legal URL characters
This commit is contained in:
parent
eaae5a4c90
commit
b179ab650a
|
@ -452,9 +452,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';
|
||||
|
|
Loading…
Reference in New Issue
Block a user