diff --git a/lib/util.php b/lib/util.php
index f4ba3a6c21..79611af2c4 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -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
')(?127.0.0.1/Name:test.php'),
array('127.0.0.1/~test',
'127.0.0.1/~test'),
+ array('127.0.0.1/+test',
+ '127.0.0.1/+test'),
+ array('127.0.0.1/$test',
+ '127.0.0.1/$test'),
+ array('127.0.0.1/\'test',
+ '127.0.0.1/\'test'),
+ array('127.0.0.1/"test',
+ '127.0.0.1/"test'),
+ array('127.0.0.1/-test',
+ '127.0.0.1/-test'),
+ array('127.0.0.1/_test',
+ '127.0.0.1/_test'),
+ array('127.0.0.1/!test',
+ '127.0.0.1/!test'),
+ array('127.0.0.1/*test',
+ '127.0.0.1/*test'),
array('127.0.0.1/test%20stuff',
'127.0.0.1/test%20stuff'),
array('http://[::1]:99/test.php',