Fix autoLinkUrls so it re-capture query strings.

Fixes #3296
This commit is contained in:
mark_story 2012-10-11 08:16:51 -04:00
parent f06bdde8c6
commit b1dfab87e4
2 changed files with 16 additions and 1 deletions

View file

@ -101,7 +101,7 @@ class TextHelper extends AppHelper {
$this->_placeholders = array();
$options += array('escape' => true);
$pattern = '#(?<!href="|src="|">)((?:https?|ftp|nntp)://[^\s<>()]+\.[a-z]+(?:\/[^\s]+)?)#i';
$pattern = '#(?<!href="|src="|">)((?:https?|ftp|nntp)://[a-z0-9.\-:]+(?:/[^\s]*)?)#i';
$text = preg_replace_callback(
$pattern,
array(&$this, '_insertPlaceHolder'),