]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
do not allow [ and ] - they are not legal URL characters
authorCraig Andrews <candrews@integralblue.com>
Mon, 2 Nov 2009 15:38:01 +0000 (10:38 -0500)
committerCraig Andrews <candrews@integralblue.com>
Mon, 2 Nov 2009 17:53:02 +0000 (12:53 -0500)
lib/util.php

index d159c583ec8f87cc8a39181a73b37989574fc72c..caffcd80766b6a7a2cdec6ac65a1762a9b1a95de 100644 (file)
@@ -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';