Michael Hoffmann 9 years ago
parent
commit
f82fb6dbaa
2 changed files with 5 additions and 1 deletions
  1. 1 1
      src/View/Helper/TextHelper.php
  2. 4 0
      tests/TestCase/View/Helper/TextHelperTest.php

+ 1 - 1
src/View/Helper/TextHelper.php

@@ -123,7 +123,7 @@ class TextHelper extends Helper
                     (?<left>[\[<(]) # left paren,brace
                     (?>
                         # Lax match URL
-                        (?<url>(?:https?|ftp|nntp):\/\/[\p{L}0-9.\-_:]+(?:[\/?][\p{L}0-9.\-_:\/?=&>\[\]()#@]+)?)
+                        (?<url>(?:https?|ftp|nntp):\/\/[\p{L}0-9.\-_:]+(?:[\/?][\p{L}0-9.\-_:\/?=&>\[\]()#@\+]+)?)
                         (?<right>[\])>]) # right paren,brace
                     )
                 )

+ 4 - 0
tests/TestCase/View/Helper/TextHelperTest.php

@@ -356,6 +356,10 @@ class TextHelperTest extends TestCase
             [
                 'https://nl.wikipedia.org/wiki/Exploit_(computerbeveiliging)',
                 '<a href="https://nl.wikipedia.org/wiki/Exploit_(computerbeveiliging)">https://nl.wikipedia.org/wiki/Exploit_(computerbeveiliging)</a>'
+            ],
+            [
+                'http://dev.local/threads/search?search_string=this+is+a+test',
+                '<a href="http://dev.local/threads/search?search_string=this+is+a+test">http://dev.local/threads/search?search_string=this+is+a+test</a>'
             ]
         ];
     }