Common subdirectories: modules/filter_old/CVS and modules/filter/CVS diff -up modules/filter_old/filter.module modules/filter/filter.module --- modules/filter_old/filter.module 2009-01-21 11:58:42.000000000 -0500 +++ modules/filter/filter.module 2009-01-30 16:52:20.000000000 -0500 @@ -732,7 +732,7 @@ function _filter_url($text, $format) { $text = ' ' . $text . ' '; // Match absolute URLs. - $text = preg_replace_callback("`(

|

  • ||[ \n\r\t\(])((http://|https://|ftp://|mailto:|smb://|afp://|file://|gopher://|news://|ssl://|sslv2://|sslv3://|tls://|tcp://|udp://)([a-zA-Z0-9@:%_+*~#?&=.,/;-]*[a-zA-Z0-9@:%_+*~#&=/;-]))([.,?!]*?)(?=(

    |
  • ||[ \n\r\t\)]))`i", '_filter_url_parse_full_links', $text); + $text = preg_replace_callback("`(

    |

  • ||[ \n\r\t\(])((http://|https://|ftp://|mailto:|smb://|afp://|file://|gopher://|news://|ssl://|sslv2://|sslv3://|tls://|tcp://|udp://)([][a-zA-Z0-9@:%_+*~#?&=.,/;-]*[a-zA-Z0-9@:%_+*~#&=/;-]))([.,?!]*?)(?=(

    |
  • ||[ \n\r\t\)]))`i", '_filter_url_parse_full_links', $text); // Match e-mail addresses. $text = preg_replace("`(

    |

  • ||[ \n\r\t\(])([A-Za-z0-9._-]+@[A-Za-z0-9._+-]+\.[A-Za-z]{2,4})([.,?!]*?)(?=(

    |
  • ||[ \n\r\t\)]))`i", '\1\2\3', $text); diff -up modules/filter_old/filter.test modules/filter/filter.test --- modules/filter_old/filter.test 2009-01-26 09:08:43.000000000 -0500 +++ modules/filter/filter.test 2009-01-30 16:51:27.000000000 -0500 @@ -214,7 +214,9 @@ class FilterTestCase extends DrupalWebTe * Test the HTML filter */ function testHtmlFilter() { - + $filtered = _filter_url('http://www.example.com/index.php?a[]=1', 'f'); + $this->assertEqual($filtered, 'http://www.example.com/index.php?a[]=1', t('Converting URLs -- addresses with square brackets.')); + } } function createFormat($filter) {